I set up a log in using the log in firebase auth tutorial and was working fine until recently I have noticed the nothing is being stored in the database anymore. The only thing I have changed really is linked the project with adMob and I gave project ownership to another account. I have determined that it is running through the code so I am not sure what is going on. Also, it is being saved to the authentication and the users are being created.
let db = Firestore.firestore()
db.collection(email).document("log-in").setData( ["firstname":firstName, "lastname":lastName, "uid": result!.user.uid ]) { (error) in
if error != nil {
//show error message
self.showError("Error recording name")
}
}