When the user signs up the display name doesn't save.
I tried to make a login system and all works fine until the displayName (see below).
Can anyone tell me what I am doing wrong?
function signUp() {
// Fetching value from a html input fields with id
const email = document.getElementById("email").value;
const password = document.getElementById("password").value;
// Fetching additional informations
const displayName = document.getElementById("displayName").value;
// Performing Sign Up Operation
firebase.auth().createUserWithEmailAndPassword(email, password);
user.updateProfile({
displayName: displayName
});
};