From c2ac5907e5fb76f9eab98a568e06aefa0dcda6c6 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Sun, 24 Nov 2013 15:24:19 -0500 Subject: [PATCH] Removed unnecessary route callbacks from facebook and google auth --- app.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/app.js b/app.js index e30fbd8110..0cab8e9f9c 100755 --- a/app.js +++ b/app.js @@ -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);