Hi i am working on a project where a user logs in via google account.(localhost) I have implemented the google signup. As soon as I log in from my account I am getting the b
The problem is not in your "snippet", look at the routes. It should be absolute path on redirect for google.
router.get('/auth/google/callback',
passport.authenticate('google', { failureRedirect: '#/signIn' }),
function(req, res) {
// absolute path
res.redirect('http://localhost:8888/#/home');
});
It's known issue, follow this link to other workarounds https://github.com/jaredhanson/passport-google-oauth/issues/82