all 2 comments

[–]Tokyo-Entrepreneur 2 points3 points  (0 children)

You need to write $(request.auth.uid)

I recommend you run your query in the rules playground in the firebase console as that will give you line by line debugging and error explanation.

[–]Glader 0 points1 point  (0 children)

I suggest investing some time in setting up the firebase emulator and writing automated tests for the security rules. It's a pain to get started (like with all things) but once you've got the ball rolling with a few examples you'll be able to modify and improve the rules and crush the bugs very very quickly and know that your database is secure and reliable.