How to update user with displayName
Documentation is here
let changeRequest = Auth.auth().currentUser?.createProfileChangeRequest()
changeRequest?.displayName = displayName
changeRequest?.commitChanges { (error) in
// ...
}
When you want to change the details of a user in Firebase, you want to use FIRAuth.auth().currentUser.profileChangeRequest
in order to update any details other than the user's email and password. To update their email or password, you need to use a specific method for each. updateEmail
and updatepassword