update photoURL firebase 1

update photoURL firebase

 var user = firebase.auth().currentUser;user.updateProfile({  displayName: "Jane Q. User",  photoURL: "https://example.com/jane-q-user/profile.jpg"}).then(function() {  // Update successful.}).catch(function(error) {  // An error happened.}); 

Here is what the above code is Doing:
1. We’re getting the current user from the Firebase Auth service.
2. We’re updating the user’s display name and photo URL.
3. We’re handling the case where the update was successful.
4. We’re handling the case where the update failed.

Similar Posts