Can't access user's email #30

Closed
SomeKittens opened this Issue Mar 26, 2013 · 3 comments

Projects

None yet

3 participants

@SomeKittens

The docs say that I can access the user's email through the profile object, but a console.log reveals

emails: [ { value: undefined } ],
@AustP
AustP commented Mar 29, 2013

@SomeKittens - You have to ask Facebook to receive the user's e-mail.

app.post('/login/facebook', passport.authenticate('facebook, {
  failureRedirect: '/login/facebook',
  failureFlash: true,
  scope: ['email']
}),
function(req, res){
  res.redirect('/');
});
@SomeKittens

Thank you. Could the docs be updated to note that some providers require the developer to set extra permissions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment