make sure firestore id is unique code example Example: firestore generate unique id let newUid = AngularFirestore.createId();