I am trying to set a custom rule in Firestore using the following documentation: https://firebase.google.com/docs/reference/security/database/#containssubstring
I'm using the custom claims for this.
What works:
match /calendar/{calendar} {
allow read: if request.auth.token.customData == "calendar-read,calendar-write";
}
What doesn't work and I don't know why:
match /calendar/{calendar} {
allow read: if request.auth.token.customData.contains("calendar-read");
}
This will give me: "FirebaseError: Missing or insufficient permissions"
match /calendar/{calendar}). You need to give more detail on how you set the Custom Claims in order for us to help you. - Renaud Tarnec