Fixed github callback route redirection, new user is now successfully created on github login

This commit is contained in:
Sahat Yalkabov
2013-12-03 17:57:54 -05:00
parent c7c1676a68
commit f48702c448
2 changed files with 20 additions and 7 deletions

3
app.js
View File

@ -64,8 +64,7 @@ app.get('/auth/facebook', passport.authenticate('facebook', { scope: 'email' }))
app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login' }));
app.get('/auth/github', passport.authenticate('github'));
app.get('/auth/github/callback', passport.authenticate('github', { successRedirect: '/', failureRedirect: '/login' }));
app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.redirect('/'); });
app.get('/auth/google', passport.authenticate('google', { scope: 'profile email' }));
app.get('/auth/google/callback', passport.authenticate('google', { successRedirect: '/', failureRedirect: '/login' }));