diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-08-14 10:13:55 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-08-14 10:13:55 +0000 |
| commit | a532390f81e35f611fd02ad3d543f4d52217ca3c (patch) | |
| tree | 7bebb4f5614afb82c3103b6e9730a62f0b97a42d /routes/index.js | |
| parent | ef2674cfe13d2c425c5a3b312244c46f2531979d (diff) | |
Fixed signin and signup
Diffstat (limited to 'routes/index.js')
| -rw-r--r-- | routes/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/index.js b/routes/index.js index b2a90dc..c87ced9 100644 --- a/routes/index.js +++ b/routes/index.js @@ -271,7 +271,7 @@ router.get('/solutions/:exam_id/:q_num', function (req, res) { /** Redirect the user to Facebook for authentication. When complete, Facebook will redirect the user back to the application at /auth/facebook/callback */ -router.get('/auth/facebook', passport.authenticate('facebook')); +router.get('/auth/facebook', passport.authenticate('facebook', { scope: ['email']})); /** Facebook will redirect the user to this URL after approval. Finish the authentication process by attempting to obtain an access token. If @@ -280,7 +280,7 @@ router.get('/auth/facebook', passport.authenticate('facebook')); router.get('/auth/facebook/callback', passport.authenticate('facebook', { successRedirect: '/user/user_profile', - failureRedirect: '/user/logout' })); + failureRedirect: '/user/signin' })); |
