Firebase允许来自同一电子邮件地址的多个帐户 [英] Firebase Allowing Multiple Accounts from Same Email Address

查看:174
本文介绍了Firebase允许来自同一电子邮件地址的多个帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Firebase控制台中,我专门将其设置为仅允许每个电子邮件地址一个帐户".可以在登录方法选项卡上的高级"下找到.

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

我有一个使用Google登录方法创建的帐户,其地址类似于"me@gmail.com".如果我随后选择使用也使用"me@gmail.com"的帐户通过Facebook登录,则Firebase允许使用该帐户,但Users实体中的电子邮件地址为空.

I have an account created using the Google login method that has an address like "me@gmail.com". If I then choose to sign-in via Facebook using an account that also uses "me@gmail.com", Firebase is allowing it with the exception that the email address in the Users entity is null.

Firebase文档指出:

The Firebase documentation states:

如果您不允许使用相同电子邮件地址的多个帐户,则 用户无法创建使用Google帐户登录的新帐户 如果已经有一个帐户,则使用电子邮件地址ex@gmail.com 使用电子邮件地址ex@gmail.com和密码登录.

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 ex@gmail.com if there already is an account that signs in using the email address ex@gmail.com and a password.

这是否仅在您尝试直接使用用户名/密码创建Firebase登录而不是通过Facebook和Google这样的两家提供商创建帐户时才算在内?我的印象是,如果发现重复的电子邮件地址,则应拒绝注册/登录.我确实意识到引号中包含和密码",这让我感到奇怪.

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.

推荐答案

步骤1:转到Firebase控制台>身份验证>登录方法.选中阻止使用单个电子邮件ID创建多个帐户的选项.

Step 1 : Go to Firebase Console > Authentication > Sign in method. Check the option preventing multiple account creation with single email id.

第2步:以下文档说明了如何使用自定义方法将多个提供商连接到一个帐户.

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

这篇关于Firebase允许来自同一电子邮件地址的多个帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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