Originally published on bendyworks. com. When a user signs in with Google I'm going to create a user document in Firestore. Each authenticated user should only be able to create one user document. These documents will eventually be readable by other users so Firestore needs to have server(less)-side validation to keep the data as correct as possible. Right now I'm working on registering users so I'm only going to implement create rules, not read , update , etc. match / users / { userId } { allow create : if isOwner ( userId ) && // TODO: enable after bug fix https://github.com/firebase/firebase-tools/issues/1073 // validCreateTimestamps() && validCreateUser (); } This will allow user documents to be created if the owner has the same ID and the document being created passes validation. Validation of timestamps is being...