I'm creating a new user with auth which is working then taking that newly create uid to create a new document with the same.
const currentUser = await auth.createUserWithEmailAndPassword(email, pass);
console.log('user registered')
await setDoc(doc(db, "users", currentUser.user.uid),{
forname: "Peter",
surname: "Parker"
})
console.log('user profile added')
dispatch({type:'USER_REG', payload: currentUser});
The reg process fires off without issue as I get the console log then the program just waits, its like setDoc is running but never completing and I have no idea why. Any help is appreciated.