next-firebase-course
next-firebase-course copied to clipboard
Update security rule for collection group queries
For some reason, I needed to update the security rule of this course from:
// Required for collection group queries match /posts/{postId} { allow read; }
to
// Required for collection group queries match /{path=**}/posts/{postId} { allow read; }
Otherwise I was getting permission denied errors. The docs also state this here: https://firebase.google.com/docs/firestore/security/rules-query#collection_group_queries_and_security_rules