vapor-community / Imperial

Federated Authentication with OAuth providers
MIT License
155 stars 48 forks source link

Redirect Url not called #65

Closed preducaeduard closed 3 years ago

preducaeduard commented 4 years ago

Hi, I have a problem with the login functionality on facebook, when I call facebook and give me access to the token, the callback is not called and I can't create the user.

How can i fix this?

sphericalwave commented 4 years ago

@calebkleveter, @rafiki270

I'm seeing something similar with GitHub. An example project would be very helpful. No one seems to be responding on Discord. I've tried on several occasions over the past few weeks. This closure never gets called despite everything else looking good. The last step is problematic.

try app.oAuth(from: GitHub.self, authenticate: "github", callback: "gh-auth-complete") { (request, token) in
        print(token)
        return request.eventLoop.future(request.redirect(to: "/"))
}

ImperialTrouble_1 ImperialTrouble_2 ImperialTrouble_3 ImperialTrouble_4 ImperialTrouble_5

0xTim commented 3 years ago

@sphericalwave did you solve this? I've tested GitHub in both the Vapor 3 and Vapor 4 releases and they work fine with me. I'm closing this due to inactivity, feel free to reopen @preducaeduard and @sphericalwave