Within the Firebase console I have specifically set it to only allow "One account per email address". This is found on the sign-in method tab under "advanced".
I have an account created using the Google login method that has an address like "[email protected]". If I then choose to sign-in via Facebook using an account that also uses "[email protected]", Firebase is allowing it with the exception that the email address in the Users entity is null.
The Firebase documentation states:
if you don't allow multiple accounts with the same email address, a user cannot create a new account that signs in using a Google Account with the email address [email protected] if there already is an account that signs in using the email address [email protected] and a password.
Does this only count if you are trying to create a Firebase login directly with a username/password vs creating an account from two providers like Facebook and Google? I would be under the impression that if it finds a duplicate email address it should reject the registration/login. I do realize the quote states "and a password" which makes me wonder.
This works in many email clients such as Gmail, iCloud/Apple, Outlook, and Hotmail, but not all. Please check to see if your email provider supports 'plus aliasing' or 'subaddressing'. When creating the second account, you will need to type in the alias email address into the email address field for the new account.
Can I Have Multiple Gmail Accounts? The short answer is, "Yes, you can have multiple Gmail accounts." Many professionals have both a personal Gmail account and a work Gmail account tethered to their CRM.
If you do allow multiple accounts with the same email address, your app's sign-in flow cannot rely on an email address to identify a user account. Allowing multiple accounts to have the same email address also changes the behavior of the following functions in the Web SDK: firebase. auth().
You can allow users to sign in to your app using multiple authentication providers by linking auth provider credentials to an existing user account. Users are identifiable by the same Firebase user ID regardless of the authentication provider they used to sign in.
Go to Firebase Console
In the Authentication -> SIGN-IN METHOD
Scroll Down to Advanced Section Click on CHANGE and then SAVE
Step 1 : Go to Firebase Console > Authentication > Sign in method. Check the option preventing multiple account creation with single email id.
Step 2 :The following documentation explains how to connect multiple providers to a single account using custom method.
https://firebase.google.com/docs/auth/web/account-linking
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With