From feaef3155b64157ec3154cf59e0eb9ba4025c94c Mon Sep 17 00:00:00 2001 From: Victor Zamfir Date: Sun, 16 Mar 2014 19:25:16 +0200 Subject: [PATCH] added permission request for email the application will trigger an error is this is not added here, since you won't have access to user's email in passport's facebook strategy. --- app/routes/users.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/routes/users.js b/app/routes/users.js index 2896bf48..32f076f3 100644 --- a/app/routes/users.js +++ b/app/routes/users.js @@ -14,6 +14,7 @@ module.exports = function(app) { // Setting the facebook oauth routes app.get('/auth/facebook', passport.authenticate('facebook', { + scope: ['email'], failureRedirect: '/#!/signin' }), users.signin); app.get('/auth/facebook/callback', passport.authenticate('facebook', { @@ -50,4 +51,4 @@ module.exports = function(app) { // Finish by binding the user middleware app.param('userId', users.userByID); -}; \ No newline at end of file +};