简体   繁体   中英

Add a "Full Name" Field to Firebase Email/Password Authentication?

Is there a way to add a "Full Name" field to the Email/Password authentication on Firebase? (Using Swift)

You cannot add your own custom field to the Firebase Authentication social providers (Facebook, Google, etc) or email+password. You can of course store such information in your Firebase Database, keyed by the user's ID:

users
  uid_209103
    fullName: "Frank van Puffelen"

Note that Firebase Authentication already has a displayName property for each user, which may cover your needs.

We cannot add a new field in Firebase Authentication. However, you can still store a user's full name, Firebase does provide this facility. Either you can use Firebase Database to store a user's information as Frank van Puffelen stated in his answer above.

Or if you are just trying to save user's name, you can update User's profile (DisplayName and ProfilePhoto link). For iOS, Update User's Profile in FirebaseAuth

For Android, Update User's Profile in FirebaseAuth

It comes in handy when you have a basic app and you want to store only little information about the user such as their Display Name or Profile Profile only. What I do is, after creating a new user, update the user's profile immediately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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