0

I use authentication firebase to login and logout(by email/password). Now I would like to add information in this user(Name, age,...) ? How to do it? Please help me . Thanks

  • check this http://stackoverflow.com/questions/37415863/firebase-setting-additional-user-properties/37420701#37420701 – tompadre May 03 '17 at 13:32

1 Answers1

0

After you log in the user , you can update his info using this method:

FirebaseUser mFirebaseUser = mFirebaseAuth.getCurrentUser();
mFirebaseUser.updateProfile(new UserProfileChangeRequest.Builder()
        .setDisplayName("Someone")
        .setPhotoUri(someImageUri)
        .build());

For additional fields you would have to create entries in the Realtime DB.

Hristo Stoyanov
  • 1,960
  • 1
  • 12
  • 24