Firebase Google linked account returns null email

Viewed 452

Sometimes in my app, whenever I get the logged in user provider data from Firebase, the linked Google account comes empty or null.

enter image description here

In firebase I have linked my google accouny with the login, as you can see in the console: enter image description here

In the project settings I have Multiple Accounts per email enabled.

1 Answers

Did you use oAuth scopes for both user profile and email:

var provider = new firebase.auth.OAuthProvider('google.com');
provider.addScope('profile');
provider.addScope('email');
firebase.auth().signInWithPopup(provider).then(function(result) {
 var user = result.user;
});
Related