vapor-community/Imperial

Redirect Url not called

preducaeduard opened this issue · 2 comments

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?

@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

@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