74831

Firebase simulate read denied

Question:

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: <a href="https://i.stack.imgur.com/vVVs0.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/vVVs0.png" data-original="https://i.stack.imgur.com/vVVs0.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Everytime I try to simulate. Firebase says that the "Simulate read denied".

<a href="https://i.stack.imgur.com/wppB4.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/wppB4.png" data-original="https://i.stack.imgur.com/wppB4.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Any ideas that I am doing wrong here?

Answer1:

I realised the problem. I was accessing "/users" but instead, I should be accessing "/users/$uid" to simulate rule.

Recommend

  • Cannot update firebase version [duplicate]
  • Django: DRY principle and UserPassesTestMixin
  • Firebase firestore cloud functions showing trigger type 'unknown'
  • How to calculate total across columns but one?
  • Firebase, only get new children
  • firebase, how to update data at a key
  • Attemping to change attributes of $(this) inside success function
  • How to validate a year I enter in textbox using jquery rule?
  • Laravel at least one field is required
  • Django return user model id with L
  • New Firebase failed: First argument must be a valid firebase URL and the path can't contain “.”
  • Does Apportable support to build library binary (.a/.so)?
  • Is there some graphical way to create my own configuration file on SonarLint?
  • Laravel: Getting Session ID oddly truncates when using foreach
  • C++ pointer value changes with static_cast
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • rspec simple example getting error on request variable in integration test
  • Marklogic : Query response time is very high
  • htaccess add www if not subdomain, if subdomain remove www
  • Switching to Release Build causes runtime error in Web Reference
  • Recording logins for password protected directories
  • Email format validation in mvc3 view
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • How to make a tree having multiple type of nodes and each node can have multiple child nodes in java
  • How to add date and time under each post in guestbook in google app engine
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • How to extract text from Word files using C#?
  • How to check if every primary key value is being referenced as foreign key in another table
  • Sending data from AppleScript to FileMaker records
  • Cassandra Data Model
  • QuartzCore.framework for Mono Develop
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • SQL merge duplicate rows and join values that are different
  • Codeigniter doesn't let me update entry, because some fields must be unique
  • python regex in pyparsing
  • Suggestions to manage Login/Logout transitions
  • coudnt use logback because of log4j
  • LevelDB C iterator
  • Can't mass-assign protected attributes when import data from csv file
  • How to get NHibernate ISession to cache entity not retrieved by primary key