Question on empty email field of Firebase Auth User using Facebook and Google+ Integration (Android Firebase SDK)

913 views
Skip to first unread message

Muhammad Rayhan

unread,
May 28, 2016, 7:59:03 PM5/28/16
to Firebase Google Group
Hi all,
I have successfully deployed tutorial code from https://firebase.google.com/docs/auth/android/facebook-login and https://firebase.google.com/docs/auth/android/google-signin for integrating Firebase Auth logins with Facebook and Google+. The users successfully created in Firebase Auth console.

However, I noticed that the Email field in the user object is empty (—). Strangely, I successfully retrieved the email information directly from provider result objects using GraphRequest (for facebook) and GoogleSignInResult (for Google+)

Based on the documentation I read (https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser.html#getEmail()), the email field should be populated from login providers.

Is there something I miss or did I do something wrong?

Muhammad Rayhan

unread,
May 30, 2016, 11:01:11 AM5/30/16
to Firebase Google Group
Hi, just want to add some information on the issue, when I try Facebook Login using Firebase Android SDK:
1. After successful login, the onAuthStateChanged is called twice. The value of firebaseAuth.getCurrentUser().getProviderId() is "Firebase" on both ocassion
2. I try to list down the providers from the FirebaseUser object, user.getProviderData(). I got two providers: "firebase" and "facebook.com"
3. When I tried to update email using FirebaseUser.updateEmail(), I got this error: An internal error has occured. [ EMAIL_EXISTS ]


Reply all
Reply to author
Forward
0 new messages