How to add username with email and password in Firebase?

后端 未结 3 1617
野趣味
野趣味 2021-02-05 15:51

I\'m using Firebase and I\'m trying to add a username to the database with the email and password.

\"This

3条回答
  •  终归单人心
    2021-02-05 16:16

    You need to create that database users child node yourself ;-)

    The createUserWithEmailAndPassword function only creates a new user in Firebase authentication service. The database itself isn't changed at all as a result.

    To add this new user to the database as well, try:

    firebase.database().ref("users").child(user.uid).set(...)
    

提交回复
热议问题