I am trying to write data from my own account but the Firebase is giving me error “Permission Denied”.
I have set rules so that only the user can read or write only their data and not others. But I logged in with my own account and tried to store data but it is saying “Permission Denied”.
Thanks I know this but this is not the problem. I have set it true for testing purposes only. I am having problem with the “Users” bucket. I am unable to read or write data into my own bucket even when I am authenticated.
Read and Write only to a User’s Area
This provides an authenticated user access to just their own content. They can read and write in their own protected area, using the “uid” as the marker for their data
Try setting your <ProjectBucket> in the rules and use the rules as I indicated above, and/or follow the Firebase Authentication documentation again, which shows the same thing.
These rules will not work if you want user to only read and write his own data. To do that, use a wildcard as user’s UID in your real-time database as a tag and then write these rules: