trailsjs/sails-permissions

Neither a username nor email was available

Opened this issue · 2 comments

In facebook i have email, public_profile and user_friends enabled and my app is live for public
In config/passport.js file i have:

options: {
clientID: '1668398173437030',
clientSecret: '3fb3703e661255277281c1ce9d5bdbd3',
scope: ['email']
}

But still everytime i request to auth/facebook it says neither a username nor email id was available. I am using a username which uses email id not mobile number to login.

Where am i wrong?

any update on this please

I think you also need to add profileFields: ['emails'] option (https://github.com/jaredhanson/passport-facebook#profile-fields)