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
Firebase users have a fixed set of basic properties—a unique ID, a primary email address, a name and a photo URL—stored in the project's user database, that can be updated by the user (iOS, Android, web).
You create a new user in your Firebase project by calling the createUserWithEmailAndPassword method or by signing in a user for the first time using a federated identity provider, such as Google Sign-In or Facebook Login.
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);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With