In my IOS signup page, I am using the following code:
firebaseConfig.auth().createUserWithEmailAndPassword(email.value, password.value)
.then(id => {
if (id) {
const data = {
id: id.user.uid,
planid: 'APPLE',
plancreated: new Date(),
email: id.user.email,
}
firebaseConfig
.firestore()
.collection('user')
.doc(id.user.uid)
.set(data)
}
}).catch(err => {
console.log(err)
setErrorMsg(err.message)
setTogle(false)
});
Firebase creates the user but does not create the additional data in the ‘user’ collection. I have persistence enabled – but just wondering why it would not create the additional data.