Common Examples Simple, yet useful Firestore rules examples

This lesson is available for PRO members or as a single course purchase. Sign-in and choose a plan below.
Get Unlimited PRO Access


*Enrollment provides full access to this course (and updates) for life.

file_type_firebase firestore.rules
match /users/{userId} {

    allow read: if request.auth.uid != null;
    allow write: if request.auth.uid == userId;


match /todos/{docId} {

    allow read: if == 'published';

    allow create: if request.auth.uid == 
                && request.time ==;

    allow update: if request.auth.uid == 
                &&['text', 'status']);


Ask questions via GitHub below OR chat on Slack #questions