0
votes

Can someone help to solve why this firestore rule is not working. Am I missing something simple ?? If you look at the clip below you see my rule for /users/{userId} is allow read: if request.auth.uid == userId; BUT THE SIMULATION FAILS , and my chrome console also confirms "Missing or insufficient permissions"

request.auth.uid'

1

1 Answers

1
votes

You can't use wildcards for document locations like that in the simulator. Your "Location" string on the left should identify a single document.

Also, if you want to test authentication, you will need to provide a UID to test with in the "Firebase UID" field.

In your case, you will want to test using the same UID string value in both the document location and the UID fields.