简体   繁体   English

Firebase fetchSignInMethodsForEmail 不提供电话身份验证

[英]Firebase fetchSignInMethodsForEmail not providing phone auth

After user register my app with phone auth, I am having trouble to detect if user exist on firebase.用户使用手机身份验证注册我的应用后,我无法检测 firebase 上是否存在用户。 I have set an email address for the user and then call fetchSignInMethodsForEmail , but it is not returning phone provider.我为用户设置了一个 email 地址,然后调用fetchSignInMethodsForEmail ,但它没有返回电话提供商。 Do we have any other method that I can use to detect if user has phone auth provider for flutter?我们是否有任何其他方法可以用来检测用户是否有 flutter 的电话身份验证提供程序?

firebase here firebase 这里

The fetchSignInMethodsForEmail function returns the email-based provider that are associated with the account. fetchSignInMethodsForEmail function 返回与帐户关联的基于电子邮件的提供商。 So if you link any email-based provider with the phone-based account it will show up, but you won't ever get back the phone auth provider.因此,如果您 将任何基于电子邮件的提供商与基于电话的帐户相关联,它将显示出来,但您将永远无法取回电话身份验证提供商。

If you need that type of mapping, consider storing it in your own database.如果您需要这种类型的映射,请考虑将其存储在您自己的数据库中。 It also sounds like a reasonable use-case, just not one the current was meant for, so I recommend filing a feature request这听起来也是一个合理的用例,只是不是当前的用例,所以我建议提交功能请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM