Here we will see about firestore database and it’s permission for read and write.
From the above picture, you see there’s a Firestore Database on the left, if it’s not there, you need to select it from build menu of your console, see at the bottom of the picture on the left, you will see, there’s a menu name build.
Select Firestore Database from there and enable it. You also need to select your region.
After that come the Firestore Database and select rules and put the rules from below snippte
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if
request.time < timestamp.date(2023, 8, 12);
}
}
}
After putting it, make sure you click on the submit button and save.
You may also additionally need Storage to be enabled if you want to store files or images.
To do it, you need to enable like the image below
Enable like the picture above and then set up rules for your storage.
Here’s the Storage rules
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}
Make sure that you click on the publish button.
Hello, thanks for post.
To know more advanced functions, there is a very good Firebase video, it explains several functions to improve Firestore security:
https://www.youtube.com/watch?v=eW5MdE3ZcAw
Thank you Rafael