Skip to content Skip to sidebar Skip to footer

Firebase Facebook Login With Redirect Returning Null Email

If I have the following code I'm trying to get the email from Facebook login however when I print the user object i get a null email. I have included a screenshot of the user obje

Solution 1:

Check the content of firebase.auth().currentUser.providerData[0].email. That should show the facebook email. It is possible you have enabled "multiple accounts per email" in the Firebase console. The default for new projects is single account per email. For migrating Firebase projects from the previous version, they are set to "multiple accounts per email". That will only set firebase.auth().currentUser.email for password accounts. For federated accounts, it is set to null. There is another possibility that the facebook account you are using is a phone number account or has chosen not to disclose the email.


Post a Comment for "Firebase Facebook Login With Redirect Returning Null Email"