-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Description
In firebase authentication Allow creation of multiple accounts with the same email address
GoogleSignInAccount googleUser = await googleSignIn.signIn();
print(googleUser.authentication);
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
print(googleAuth.idToken);
final AuthCredential credential = GoogleAuthProvider.getCredential(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
print(credential);
FirebaseUser firebaseUser =
(await firebaseAuth.signInWithCredential(credential)).user;
print("=====firebaseUser");
print(firebaseUser);
print(firebaseUser.email);
After logging in, getting the email(even others functions like displayName, photoUrl) using the FireBaseUser instance(firebase.email) returns null.
But choosing back the Prevent creation of multiple accounts with the same email address in authentication advance settings:

No errors but returning the expected email address.
PS. that email address was used in different provider(like facebook login)

