Closed Goufix closed 2 years ago
Sorry, I can't understand the issue from the given info. Could you please record a video or take a pic to help me understand this better? Thanks!
I had a similar issue but the problem was the following:
In the callback route, if you have an unidentified error then it does not return any responde therefore your browser would keep loading infinitely. To see the error I sent it as a response:
app.post("/auth", function(req, res, next) {
passport.authenticate('apple', function(err, user, info) {
if (err) {
if (err == "AuthorizationError") {
res.send("Oops! Looks like you didn't allow the app to proceed. Please sign in again! <br /> \
<a href=\"/login\">Sign in with Apple</a>");
} else if (err == "TokenError") {
res.send("Oops! Couldn't get a valid token from Apple's servers! <br /> \
<a href=\"/login\">Sign in with Apple</a>");
}
// NICO Edit's:
res.send(err);
} else {
res.json(user);
}
})(req, res, next);
});
When I try to implement this using NestJS strategies. It just does not work properly. Anything about that?