Im trying to do firebase auth in conformity with google documentation. After user is registered he is redirecting to '/' path, then im getting user display name by onAuthStateChangedListener but it return null, although im checking full user data file and contains displayName field.
auth code
firebase
.auth()
.createUserWithEmailAndPassword(email, password)
.then((result) => {
result.user
.updateProfile({
displayName: nickname,
})
getting user data code
firebase.auth().onAuthStateChanged((data) => {
if (data) setUser(data);
console.log(data);
});
