How to add additional information to firebase.auth()
As far as I know, you have to manage the users profiles by yourself if you want to have more fields than the default user provided by Firebase.
You can do this creating a reference in Firebase to keep all the users profiles.
users: {
"userID1": {
"name":"user 1",
"gender": "male"
},
"userID2": {
"name":"user 2",
"gender": "female"
}
}
You can use onAuthStateChanged
to detect when the user is logged in, and if it is you can use once()
to retrieve user's data
firebaseRef.child('users').child(user.uid).once('value', callback)
Hope it helps