Web App - Google/Facebook auth - can authenticate, but cannot retrieve email

42 views
Skip to first unread message

Luca

unread,
Jul 26, 2016, 1:53:13 PM7/26/16
to Firebase Google Group

Context: web app,  Firebase 3.2

I can authenticate the user via Google or Facebook (using the popup flow) without any issue, but I am going nuts about retrieving the email of the user... :-)

I checked both Google and Facebook and both apps require the email access as per the addScope... during the auth consent it also clearly specifies that email will be accessed.

Yet, the "user" authenticated displays the correct profile name, the photoURL, but an empty email... so I end up having a user in Firebase, but with no email attached...

Anyone has an idea of what might the reason for this?

thanks in advance!

Luca

unread,
Jul 27, 2016, 11:21:29 AM7/27/16
to Firebase Google Group

OK, found the issue... kinda of RTFM solution, but it wasn't that obvious in my view :-)


in the Authentication->Sign-in method -> Advanced section you have to set the "Prevent creation of multiple accounts with the same email address" option...

only then you will be able to retrieve the email...

hope it helps
Reply all
Reply to author
Forward
0 new messages