-
-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email key is missing in the profile object in passportjs #129
Comments
Try using the additional parameter profileFields while creating your strategy - passport.use(new FacebookStrategy({
clientID: FACEBOOK_APP_ID,
clientSecret: FACEBOOK_APP_SECRET,
callbackURL: "http://localhost:3000/auth/facebook/callback",
profileFields: ['email']
.... This worked for me |
@rohang07 : thanks for the solution, its also work for me. |
@rohang07 this solution works the case for login , but when i try to register a user then issues appear which say bad gateway |
@KanwalPrakashSingh facebook registration with similar code works for me. |
…rategy constructor, as seen in jaredhanson/passport-facebook#129 (comment). Fixes empty email issue on login.
@rohang07 |
..while creating your strategy 😄 then everything works as expected 😄 |
Now I'm getting the exact same issue. Even after trying the code that supposedly works. Perhaps it's because Facebook's oAuth is v2.6? |
Yeah, it is. That code works fine with API v2.5 but not 2.6 |
It works in API v2.6 for me. See https://developers.facebook.com/docs/graph-api/securing-requests for details. |
the solutions above didn't work for me, but with adding
|
Trying to use Facebook authentication using passportjs on my mean application. But Email key is missing in the profile object
I am getting the following object
here are the routes
here is the screenshot of my apps permission
what could be going wrong?
The text was updated successfully, but these errors were encountered: