As of today there is no way to enforce a unique constraint on a Firebase Firestore document key according to asciimikea firebase security developer on twitter. Since Firestore is backed by Google Cloud Datastore it inherits this issue. It’s been a long standing request since 2008. However, you can simulate a uniqueness constraint by using Firebase Functions and some strict security rules. Requirem

