1
votes

Does firebase auth help tackle same email id account issue?

For ex. say I am using firebase auth in my flutter app. I have Facebook and Gmail of same email. 1st I create account with Gmail, logout and then 2nd time I try to create account with facebook which has same email ID. Then is firebase designed to give me some type of error message saying "user with this email has already logged in with gmail" and vice-versa ?

Thanks in advance

2

2 Answers

1
votes

You can configure whether users can create multiple accounts that use the same email address, but are linked to different sign-in methods. For example, 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.

Please find the details here.

0
votes

No, Firebase won't throw any error, instead it will create a new account for the second sign-in provider. As Both Sign-In providers are different i.e one is facebook and other is google in your example.

If you really want to create a single account for multiple providers.Then you will need to link multiple providers to an single account.

Checkout Firebase official documentation for the instructions to achieve this on android:-

Firebase Docs