Firebase 覆盖使用 Google 帐户登录 [英] Firebase Overwrites Signin with Google Account

查看:42
本文介绍了Firebase 覆盖使用 Google 帐户登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档中似乎没有提到这一点,我发现的只是this这个,我想在这里确认一下:

There doesn't seem to be any mention of this in the documentation, and all I found was this and this, where I would like to confirm this:

如果现有帐户具有相同的电子邮件地址但使用其他凭据创建(例如密码或不受信任的提供者),出于安全原因,之前的凭据将被删除.

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.

如果用户通过 Facebook 或电子邮件/密码登录,然后通过 Google 登录,则其帐户登录方法将转换为 Google.只有 Google 会发生这种情况,并且只有一个帐户的设置处于活动状态.

If a user signs in through Facebook or email/password and later through Google, their account sign in method is converted to Google. It only happens with Google and the setting for one account only is active.

是不是故意这样的,有什么办法可以阻止吗?

Is it intended to be like this and is there any way to stop it?

推荐答案

正如文档所说:某些电子邮件域具有受信任的提供商.最突出的是:Google 是@gmail.com 地址的可信提供商,因为它是这些电子邮件地址的唯一发布者.

As the documentation says: certain email domains have a trusted provider. Most prominently: Google is the trusted provider for @gmail.com addresses, since it's the only issuer of these email addresses.

如果用户首先使用 Facebook 注册他们的 gmail 地址,然后 Google 提供商使用相同的 gmail 地址进行注册,则后者的注册将被视为否决前者.如果用户稍后再次登录 Facebook,则可以关联两个帐户.

If a user first registers their gmail address with say Facebook, and later there is a registration with that same gmail address from the Google provider, the latter registration is considered to overrule the former. If the user later signs in with Facebook again, the two accounts can be linked.

据我所知,防止这种情况的唯一方法是允许每个电子邮件地址有多个帐户.

As far as I know, the only way to prevent this is to allow multiple accounts per email address.

另请参阅一些 Firebase 身份验证工程师的帖子:

Also see these posts by some of the Firebase Authentication engineers:

这篇关于Firebase 覆盖使用 Google 帐户登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆