I'm building an Android app and I want my users to be Auth then added to the database. For now I'm only doing the Auth with an email and password, then I click register and the user is created in the Auth section in the Firebase console.
But I also want my users to be added in the database. I want to add more fields (such as name, address etc) which will be stored in the users database in Firebase.
I just don't really see how to do that. Anyone could explain please?
Thanks!
You should create a node where you save your users, like this:
users: {
userID1: {
name: 'Raph'
},
userID2: {
name: 'Devid'
}
}
Every logged user has a unique uid
that you can use as key. You can find it in the authToken when you log your user in.
NOTE this is just a normal node in Firebase that you use to save user's data. It is an alternative solution to the Firebase generated users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With