update user information in firebase

后端 未结 1 2048
后悔当初
后悔当初 2020-12-10 18:10

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 wit

相关标签:
1条回答
  • 2020-12-10 18:53

    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);
    });
    
    0 讨论(0)
提交回复
热议问题