Removed unnecessary route callbacks from facebook and google auth
This commit is contained in:
18
app.js
18
app.js
@ -64,30 +64,18 @@ app.get('/auth/facebook', passport.authenticate('facebook', {
|
|||||||
scope: [
|
scope: [
|
||||||
'email'
|
'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/facebook/callback', passport.authenticate('facebook', { successRedirect: '/', failureRedirect: '/login' }));
|
||||||
|
|
||||||
|
|
||||||
app.get('/auth/google', passport.authenticate('google', {
|
app.get('/auth/google', passport.authenticate('google', {
|
||||||
scope: [
|
scope: [
|
||||||
'https://www.googleapis.com/auth/userinfo.profile',
|
'https://www.googleapis.com/auth/userinfo.profile',
|
||||||
'https://www.googleapis.com/auth/userinfo.email'
|
'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', {
|
app.get('/auth/google/callback', passport.authenticate('google', {
|
||||||
successRedirect: '/',
|
successRedirect: '/',
|
||||||
failureRedirect: '/login'
|
failureRedirect: '/login'
|
||||||
}), function (req, res) {
|
}));
|
||||||
res.redirect('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
app.get('/auth/foursquare', api.foursquareAuth);
|
app.get('/auth/foursquare', api.foursquareAuth);
|
||||||
|
Reference in New Issue
Block a user