createUserWithEmailAndPassword(auth, state.email, state.password)
.then((userCredential) => {
setDoc(doc(db, "users", userCredential.user.uid), {
firstName: state.firstName,
lastName: state.lastName,
email: state.email,
address: state.address,
username: state.firstName,
})
Hi, im trying to add username in firebase user collection. Username should be firstname.lastname but I dont know how should I type that. This is currently working perfect but I just want add in username field "Lastname" but dont know how