如何像firebaseui一样检查电子邮件地址是否已在firebase auth上注册?

上田武之

firebaseui的登录顺序。

登录序列仅以电子邮件地址开头。

在此处输入图片说明

如果地址已注册到Firebase,则登录将继续。

在此处输入图片说明

如果未添加,将创建一个新帐户。

在此处输入图片说明

我的问题

How can I check an email address that has been registered or not on the firebase auth, as the firebaseui does it? I'm looking for the appropriate API to check the email address if it has been added or not. I've searched on the document firebase. auth. Auth, but I can't find it. I've tried the firebase.auth().signInWithEmailAndPassword(this.email, "") with expect to get the error auth/user-not-found, but I've get auth/wrong-password.

Peter Haddad

You can use the following method, from the docs:

fetchSignInMethodsForEmail

fetchSignInMethodsForEmail(email: string): Promise<Array<string>>

Gets the list of possible sign in methods for the given email address. This is useful to differentiate methods of sign-in for the same provider, eg. EmailAuthProvider which has 2 methods of sign-in, email/password and email/link.

Error Codes

auth/invalid-email Thrown if the email address is not valid.

参量

email: string

Returns Promise<Array<string>>

如果电子邮件未注册,这将返回错误

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何以编程方式在Gmail上检查电子邮件地址是否存在?

如何检查电子邮件或手机是否已在Firebase中注册

如何仅注册使用Firebase javascript中的电子邮件链接验证了电子邮件地址的用户?

检查Apple登录电子邮件是否已在Firebase中注册

检查电子邮件地址在iOS上是否有效

电子邮件地址已经被注册

如何知道电子邮件是否已在 firebase 身份验证、javascript 中注册?

如何知道Elasticsearch上是否存在电子邮件地址?

如何制定自定义Firebase规则以使用电子邮件地址进行注册?

Firebase Auth->使用signInWithCustomToken创建的用户没有电子邮件地址

I / flutter(16908):[firebase_auth / invalid-email]电子邮件地址格式错误

注册时验证用户电子邮件地址的另一种方法

Laravel 8:注册后如何验证用户的电子邮件地址而无需登录信息?

登录/注册时如何要求学校的电子邮件地址?

如何使用数据库中的电话号码或电子邮件地址进行注册?

如何使用已注册电子邮件的Firebase Auth模拟Firebase数据库规则

教师的 Moodle 注册电子邮件 - 添加学生电子邮件地址

firebase sendEmailVerification在不存在的电子邮件地址上不给出错误

在路由器代码上公开电子邮件地址是否安全?

如何阻止PHP Mailer在每个电子邮件上附加所有电子邮件地址?

Ajax在表单上检查注册的电子邮件

在电子邮件地址jQuery验证上需要域

Android在EditText上的电子邮件地址验证

隐藏UserUpdateForm上的电子邮件地址

从Tripadvisor网页上抓取电子邮件地址

如何在Git提交链上查看贡献者的电子邮件地址?

当我单击Mac上的电子邮件地址时,如何禁用Mail.app?

如何在GitHub上用我的提交电子邮件地址验证GPG密钥?

如何在启动板上更改我的电子邮件地址?