Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
Only user show his data rules firebase database

enter image description here

So what do I keep the rules of firebase database

​{ "rules": { ".read": "auth != true", ".write": "auth != true" } }

​When I keep these rules, my application gets an error in addition to the image above

So what do I do if this error occurs

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you would like to only show the users document to the user that it belongs to you will need to have a reference to the user ID in said document for example:

-Users
    --jfkdsfsadfasfsda(users ID)
        ---userID: jfkdsfsadfasfsda
        ---username: Mike Oxlong
    --gfhfdghfdfgdhfdgfd
        ---userID: gfhfdghfdfgdhfdgfd
        ---username: Tess Tickle

and your rules would look like this:

service cloud.firestore {
match /databases/{database}/documents {


 match /users/{userID} {
  allow read: if true;
  allow update, delete: if request.auth.uid == userID;
  allow create: if request.auth != null;
 }

this will allow tess to read mikes user data but not edit or delete it however allowing tess to edit her own data. also it only allows registered users to create data.

https://youtu.be/eW5MdE3ZcAw - this video is super helpful

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!