简体   繁体   English

如何在使用电话号码注册期间将名称和 email 添加到 Firebase 用户帐户?

[英]How do I add name and email to a Firebase user account during signup with phone number?

In the Firebase docs it describes how to create an account using phone number sign up .在 Firebase 文档中,它描述了如何使用电话号码注册创建帐户

When signed in, Firebase returns a user object that looks like this:登录后,Firebase 返回用户 object,如下所示:

在此处输入图像描述

However nowhere in the above docs does it describe how to add information like email and displayName during sign up.但是,在上述文档中没有任何地方描述如何在注册期间添加 email 和 displayName 等信息。

How do I add this information to a profile during the user signup using phone number authentication?如何在使用电话号码身份验证的用户注册期间将此信息添加到配置文件?

The API provides no way of providing additional information at the moment an account is first created. API 在首次创建帐户时无法提供其他信息。 However, there are links at the bottom of that page that send you to information about how to manage users after that.但是,该页面底部有一些链接,可将您发送到有关如何管理用户的信息。 In particular, you will want to read the section on updating a user's profile and setting a user's email address .特别是,您需要阅读有关更新用户配置文件设置用户 email 地址的部分 From the documentation:从文档中:

user.updateProfile({
  displayName: "Jane Q. User",
  photoURL: "https://example.com/jane-q-user/profile.jpg"
}).then(function() {
  // Update successful.
}).catch(function(error) {
  // An error happened.
});

And:和:

user.updateEmail("user@example.com").then(function() {
  // Update successful.
}).catch(function(error) {
  // An error happened.
});

暂无
暂无

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

相关问题 如何通过注册电子邮件在Firebase中“命名”数据 - How to “name” data in firebase from signup email 我可以使用此代码创建 firebase 用户,但如何在默认 firebase 用户表中添加显示名称、电话号码和其他信息? 谢谢 - I can create firebase user using this code, but how can I add display Name, phone Number and other information in default firebase user table? Thanks firebase:在注册期间发送 email 验证 - firebase : sending email verification during signup 如何将电话号码和电子邮件验证添加到Kendo-UI Grid? - How do I add phone number & email validation to Kendo-UI Grid? 如何将用户帐户信息保存到Firebase? - How do I save user account information to firebase? Email 和在 React 应用程序中使用 firebase 的密码注册,用户的显示名称在初始渲染中显示为 null。 我怎样才能解决这个问题? - Email and Password Signup using firebase in a react app , the displayName of the user appears to be null on the initial render. How can I fix this? 如何使用从 firebase 存储的 Auth uid 并更新 Auth 用户信息,例如更改密码、email 和电话号码? - How to use Auth uid that store from firebase and update Auth user information such as change password, email and phone number? Firebase (web) - 在注册时添加用户数据 - Firebase (web) - add user data upon signup firebase web,将手机验证到现有帐户 email - firebase web, authenticate phone to existing account email Firebase 用户注册 email 并通过 email 向他们发送密码 - Firebase user signup with email and send them password via email
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM