简体   繁体   English

firebase web,将手机验证到现有帐户 email

[英]firebase web, authenticate phone to existing account email

firebase web and javascript, i have an account with email and password, now I need to authenticate with the phone but to update to the previous account created with email and password, I only find that a new one is created with the phone but not to update the old one, help firebase web and javascript, i have an account with email and password, now I need to authenticate with the phone but to update to the previous account created with email and password, I only find that a new one is created with the phone but not to更新旧的,求助

In Firebase Authentication you can't just add additional info to an existing profile.在 Firebase 身份验证中,您不能只向现有配置文件添加其他信息。 But what you can do is create a profile for the user with multiple providers, and then link those providers.但是您可以做的是为具有多个提供商的用户创建一个配置文件,然后链接这些提供商。 So in your case, you'd create an additional profile with the phone number provider, and then link that to the existing email+password account.因此,在您的情况下,您将使用电话号码提供商创建一个额外的配置文件,然后将其链接到现有的电子邮件+密码帐户。

The steps (as outlined in the documentation on ):步骤(如文档中所述):

  1. Follow the flow for sending a verification code to the user's phone number按照流程向用户的电话号码发送验证码

  2. Get the AuthCredential for the user's phone auth 获取用户电话身份验证的AuthCredential

  3. Now link the auth providers to create a combined account.现在链接身份验证提供程序以创建一个组合帐户。

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

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