Passport-Facebook authentication is not providing email for all Facebook accounts

前端 未结 7 926
忘了有多久
忘了有多久 2020-12-07 20:16

I am using Passport-Facebook authentication.

  passport.use(new FacebookStrategy({
            clientID: \'CLIENT_ID\',
            clientSecret: \'CLIENT_SECRET\         


        
相关标签:
7条回答
  • 2020-12-07 21:01

    I would like to add more information here.

    While adding profileFields: ['emails'] while creating FacebookStrategy and passport.authorize('facebook', { scope : ['email'] }) solves issue for most of the users.

    There are other possible reasons where you will not get user's email after authentication.

    • No e-mail address on account
    • No confirmed e-mail address on account
    • No verified e-mail address on account
    • User entered a security checkpoint which required them to reconfirm their e-mail address and they have not yet done so
    • User's e-mail address is unreachable

    ​ you need to make sure that your user does not have any of the issues listed above. more information can be found https://developers.facebook.com/bugs/1802930019968631/

    0 讨论(0)
提交回复
热议问题