I am getting simulated read denied for accessing a simple collection
Data Model:
/users/$userId/
This is a simple collection, with no sub-collection.
In my simulator I am doing a get on a single document
/databases/users/documents/0011476476904
With below authentication payload
{
"uid": "0011476476904",
"token": {
"sub": "0011476476904",
"email": "",
"email_verified": false,
"phone_number": "",
"name": "",
"firebase": {
"sign_in_provider": "google.com"
}
}
}
I have a simple rule to allow read if auth.uid matches userId but I am still getting simulation rule denied
rules_version = '2';
service cloud.firestore {
match /databases/users/documents/{userId} {
allow read, write: if userId == request.auth.uid;
}
}
is there anything wrong in the way I have set the rule?