user4550050
user4550050

Reputation: 621

Setting more attributes to User than Email and Password.

I'm developing a web app with Firebase. When using the createUser() method of Firebase Angularjs API I can only define the Email and the Password of the User.

IS there any way to define other attributes like: First name, last name, age etc..

Upvotes: 1

Views: 1036

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599001

Firebase does not automatically store any data you pass to createUser() in a place that you have access to with a public API.

If you want to have access to data about your users from your application, you'll need to store it in your database yourself. Typically this data is stored under a top-level /users node, with each user being stored in their uid. See the section on storing user data in the Firebase documentation for some examples of this.

You'll note that this reference is of the Firebase JavaScript SDK. AngularFire does not have any API built-in for storing user data. But since AngularFire is built on top of the Firebase JavaScript SDK, the two interoperate without problems, so you can pick whichever of the APIs that allows you to accomplish your task at hand.

edit: I just noticed that the AngularFire seed application does something similar in its account and login handling.

edit2: these seem relevant:

Upvotes: 2

Related Questions