I am facing a simple issue I am getting the error "Cannot assign to read only property 'displayName' of object" im adding a setting where you can change your display name in the settings page.
function Changename() {
currentUser.displayName = setUserName
}
I am using firebase for this project, I cant find anywhere to change this read property to read and write in firebase.
My guess is that your currentUser is a reference to a User/UserInfo object from Firebase Authentication. In that case displayName property is indeed read-only. If you want to change the user's display name, call updateProfile as shown in the documentation on updating the current user's profile.