Removed unnecessary route callbacks from facebook and google auth

This commit is contained in:
Sahat Yalkabov
2013-11-24 15:24:19 -05:00
parent cbe55a79e9
commit c2ac5907e5

18
app.js
View File

@ -64,30 +64,18 @@ app.get('/auth/facebook', passport.authenticate('facebook', {
scope: [
'email'
]
}), function(req, res) {
// The request will be redirected to Facebook for authentication, so this
// function will not be called.
});
}));
app.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login' }));
app.get('/auth/google', passport.authenticate('google', {
scope: [
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/userinfo.email'
]
}), function (req, res) {
// The request will be redirected to Google for authentication, so this
// function will not be called.
});
}));
app.get('/auth/google/callback', passport.authenticate('google', {
successRedirect: '/',
failureRedirect: '/login'
}), function (req, res) {
res.redirect('/');
});
}));
app.get('/auth/foursquare', api.foursquareAuth);