Describe the bug
I'm setting security rule like this
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
When I get data from fireStore using .getDocuments exception PlatformException (PlatformException(Error performing getDocuments, PERMISSION_DENIED: Missing or insufficient permissions., null)) will be throw
snapshots().listen doesn't throw error and get data
To Reproduce
Steps to reproduce the behavior:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
Expected behavior
can get data list using security rule
Sorry
I think it was my fault
What were you doing wrong? I think I'm having the same or similar issue
I don't know the critical solution but I think I missed the rule of path
I fixed it to wild rules and passed the rules.
Your link returns 404. I think this is what you mean: https://firebase.google.com/docs/firestore/security/rules-structure#recursive_wildcards
Solved the issue for me too
Most helpful comment
Your link returns 404. I think this is what you mean: https://firebase.google.com/docs/firestore/security/rules-structure#recursive_wildcards
Solved the issue for me too