Need Help With Cloud Development?

Work with our skilled Cloud developers to accelerate your project and boost its performance.

Hire Cloud Developers

Support On Demand!

It is kind of security for the Firestore database.
It will control who can access,read,write or edit data on the Firebase Datastore.
We need to define rules for authorisation on who can access it.
It is for keeping crucial data safe.

Example script:

service cloud.firestore {
  match /databases/{database}/documents {
    match /collection/{document} {
      allow read, write: if <condition>;
    }

  }
}

 
-> service cloud.firestore: Specifies that these rules are for Firestore.
-> match /databases/{database}/documents: Targets your Firestore database.
-> match /collection/{document}: Targets a specific collection or document.
-> allow read, write: if : Grants access if the condition is true.

Related Q&A