E-mail null for in User object after authentication, settings set to 1 account per address

2,135 views
Skip to first unread message

Adam Law

unread,
Apr 13, 2017, 5:25:28 PM4/13/17
to Firebase Google Group
Hi,

As the title states, I get null for value when the user object is returned after a successful login. I've implemented multiple federated login processes, except for anonymous login, to go with email login. I also have it set to link other accounts using the same email, but that too is not triggering.

When I have an existing registered user in Firebase auth that I logged in using email, when I then try to log in (via redirect) using a federated account e.g. Facebook, instead of triggering the error for an existing account w/ different credential, the login succeeds, email is null, and on the Firebase console, I see an entry under Auth, that lists the Facebook account but w/o the email information. 

I would like to consistently have this information, as having a null value will mess up our application. I did add the email scope to the provider request when authenticating with Facebook.

Thanks.

Kato Richardson

unread,
Apr 14, 2017, 12:03:22 PM4/14/17
to Firebase Google Group
Hi Adam,

Going to be hard to help without a minimal repro and at least some basic info about your environment. But the likely answer is that you haven't included the email permission. For example, in the Android guide for Facebook:

Integrate Facebook Login into your app by following the developer's documentation. When you configure theLoginButton or LoginManager object, request the public_profile and email permissions. 

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1491197a-8382-4815-ab13-a425609b47ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Austin Mayberry

unread,
Jun 3, 2017, 2:23:10 AM6/3/17
to Firebase Google Group
I have the same issue but only in Android.  For iOS and Web SDKs the behavior is different.  Logging in with Facebook returns a user with one entry in the provider data array that has the email address in both iOS and Web, but in Android it returns two entries one for firebase and one for the federated provider (I have tried Facebook and Google)... both entries have a null value for the email address.

As far as the response below, I am experiencing the behavior for both Google and Facebook, and I did request email permissions.
Reply all
Reply to author
Forward
0 new messages