Firebase Facebook身份验证:电子邮件验证始终是错误的 [英] Firebase Facebook auth: email verified always false

查看:249
本文介绍了Firebase Facebook身份验证:电子邮件验证始终是错误的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如在标题中所说的,不管我如何尝试Facebook登录, emailVerified 字段总是为false。这是由设计?我已经读完整个firebase文档,似乎无法找到任何有关此信息。只是要确定:我已经尝试了4个不同的已验证的帐户,结果始终是相同的。任何想法可能会导致这种行为?

解决方案

谷歌供应商电子邮件验证和Facebook电子邮件不是因为Google被视为值得信赖的提供商(您可以使用Google创建电子邮件帐户)。再举一个例子。如果您使用雅虎设置电子邮件,您将收到一封电子邮件myself@yahoo.com。如果您使用雅虎OAuth 2.0登录,那么您肯定知道该用户已被验证,因为雅虎是该电子邮件地址的实际所有者和颁发者。但是,您也可以使用同一封电子邮件创建一个Facebook帐户或其他一些帐户,如github或twitter,并使用您的电话号码或其他方式进行验证。在这种情况下,如果您使用Facebook登录,则电子邮件未经验证(Facebook不拥有或管理该电子邮件地址)。通常情况下,如果你想在这种情况下验证电子邮件,你必须发送电子邮件验证(目前的实验,只有在网络和iOS可用,但最终应该来到Android)。

As said in the title, no matter how I try the Facebook login, the emailVerified field is always false. Is this by design? I've read through the whole firebase docs by now, can't seem to find any information regarding this. Just to be sure: I've tried with 4 different verified accounts, the result is always the same. Any idea what could cause this kind of behavior?

解决方案

the reason why Google provider emails are verified and Facebook emails are not is because Google is considered a trusted provider (You can create an email account using Google). Let's take another example. If you set up an email with yahoo, you will get an email myself@yahoo.com. If you sign in using yahoo OAuth 2.0, you know for sure that user is verified since Yahoo is the actual owner and issuer of that email address. However, you could also use that same email to create a facebook account or some other account like github or twitter and verify using your phone number or some other means. In that case, if you sign in using Facebook, the email is not verified (facebook does not own or manage that email address). Normally if you wish to verify the email in that case, you have to send the email verification (experimental at the moment and only available in web and iOS but should eventually come to android).

这篇关于Firebase Facebook身份验证:电子邮件验证始终是错误的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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