Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
added permission request for email
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
viczam committed Mar 16, 2014
1 parent 6705319 commit feaef31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -50,4 +51,4 @@ module.exports = function(app) {

// Finish by binding the user middleware
app.param('userId', users.userByID);
};
};

0 comments on commit feaef31

Please sign in to comment.