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.
This commit is contained in:
Victor Zamfir
2014-03-16 19:25:16 +02:00
parent 670531911e
commit feaef3155b

View File

@@ -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);
};
};