Reputation: 2107
In my firebase project, I have implemented Google Authentication.
My firebase rules looks like the following:
{
"rules": {
"users": {
"$uid": {
".read": "auth.uid == $uid",
".write": "auth.uid == $uid"
}
}
}
}
The database has the following snapshot:
Everytime I try to simulate. Firebase says that the "Simulate read denied".
Any ideas that I am doing wrong here?
Upvotes: 3
Views: 3810
Reputation: 1
I've also encountered this in FireStore and when simulating a CREATE. It turns out you also need to specify the ID when POSTing to the collection
Upvotes: 0
Reputation: 2107
I realised the problem. I was accessing "/users" but instead, I should be accessing "/users/$uid" to simulate rule.
Upvotes: 7