5

I am using angularFire in its latest version 2.0.1, but I see information on how to update information as "displayName" try to obtain user information with firebase.User() but I get error "getApi" I am misguided quisas how to update the information a user created earlier

2
  • which firebase version are you using ?
    – Ymmanuel
    Commented Jun 3, 2016 at 17:01
  • I'm using the latest version sdk 3.0 Commented Jun 3, 2016 at 18:06

1 Answer 1

17

I found a solution for this problem. You can do the following:

var user = firebase.auth().currentUser;
user.updateProfile({
  displayName: vm.form.username
}).then(function(response) {
  //Success
}, function(error) {
  //Error
  console.log(error);
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.