Not getting the email using Google Authentication in Firebase

前端 未结 2 1603
情歌与酒
情歌与酒 2021-02-20 02:20

I am using the code provided by Firebase for Google Authentication and somehow, the authentication was successful but the email was not correctly imported to Firebase.

h

相关标签:
2条回答
  • 2021-02-20 02:57

    The email is not showing on firebase console because you are allowing users to create multiple accounts with the same email. If you navigate to Auth -> Sign-in method you can set the option to Avoid creating multiple accounts with the same e-mail. After doing so the emails will start to appear when creating the user.

    Not sure here but, if you still want to create multiple accounts and have the user email on the application side I guess that you will need to store the email on firebase database when creating the user.

    0 讨论(0)
  • 2021-02-20 02:58

    You can search in list ProviderData:

    userFirebase.providerData

    The providerId "google.com" as usual have the email.

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