I am using Facebook v2.5 API.
route :
app.get('/auth/facebook', passport.authenticate('facebook', { scope : 'email' }));
config :
passport.use(new FacebookStrategy({
clientID: CLIENTID,
clientSecret: CLIENTSECRET,
callbackURL: callbackURL,
profileFields: ["emails", "displayName", "gender"]
},
function (token, refreshToken, profile, done) {
console.log(profile)
...
}));
profile does not have "emails" field.
I tried passing scope as an array too
scope : ['email']