FirebaseAuthInvalidCredentialsException when using “One account per email address”

后端 未结 2 2130
时光取名叫无心
时光取名叫无心 2021-01-04 14:04

... 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 em

2条回答
  •  忘掉有多难
    2021-01-04 14:55

    To optimize the login UI steps and enhance account security, Firebase Authentication has a concept of 'trusted provider', where the identity provider is also the email service provider. For example, Google is the trusted provider for @gmail.com addresses, Yahoo is the trusted provider for @yahoo.com addresses, and Microsoft for @outlook.com addresses.

    In the "One Account per Email address" mode, Firebase Authentication tries to link account based on email address. If a user logins from trusted provider, the user immediately signs into the account since we know the user owns the email address.

    If there is an existing account with the same email address but created with other credentials (e.g. password or non-trusted provider), the previous credentials are removed for security reasons.

    A phisher (who is not the email address owner) might create the initial account - removing the initial credential would prevent the phisher from accessing the account afterwards. The legit user can set up a password by going through the password reset flow, where she would need to prove she owns the email address.

提交回复
热议问题