I want to secure my firestore data. I have an app that accesses the data from firestore. Currently, my rules allow anyone to read and write. How can I access the data using a key I have in the app? Sort of verify a key before anyone can read or write data.
Here are my current rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
https://gyazo.com/da26189ac1c5bbdea8d374ad8870bd7f - this is why I am asking
match /{document=**} { allow read, write: if true; }falseor delete this line.