Firebase – Firestore rules for "arrayUnion" update giving permission denied error
In my code I'm updating a user's "decks" list by adding one item: const deckId = 'fake-deck-id'; await updateDoc(doc(db, 'users', userId), { decks: arrayUnion(deckId), }); However, this is giving a permission-denied error. Here are my firestore rules: // Allow updates…