Security/Indexes

Security

Navigate to Firestore Database -> Click “Rules” tab. Replace the existing rules with following code snippet.

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

 

Indexes

Click on Indexes tab. Set the indexes according to following image.