Firebase Test Security Rules

The following security rules are default Test Security Rules for Any Firebase Project.

STEP 1: Set Firestore DATABASE Test Rules #

Go to : Firebase Dashboard > Firestore Database > Rules tab , paste the below code & click on “Publish” Button

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth!=null;
      allow read, write: if request.auth==null;
    }
  }
}

STEP 2: Set STORAGE Test Rules #

Go to : Firebase Dashboard > Storage > Rules tab , paste the below code & click on “Publish” Button

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
      allow read, write: if request.auth == null;
    }
  }
}

Powered by BetterDocs