Open aishikanandi opened 1 year ago
thank you
i am getting Access blocked: Authorization Error after registering through google email id.
Hey , check my repo to see if you found the solution , my code works
Thank you so much. i have been looking for this answer since 3 days and finally i get my answer by this post. thank you so much once again.
1) Change app.get('/auth/google") :
app.get("/auth/google", passport.authenticate('google',{ scope: ["profile"] }), function(req, res) { // Successful authentication, redirect to secrets. res.redirect("/auth/google/secrets"); });
2) Use : passport.serializeUser((user, done) => done(null, user)); passport.deserializeUser((user, done) => done(null, user));
Instead of: passport.serializeUser(User.serializeUser()); passport.deserializeUser(User.deserializeUser());
3) Also, remove: userProfileURL :"https://www.googleapis.com/oauth2/v3/userinfo" from GoogleStrategy. It is no longer needed. Google Auth popup must work now.