Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

94
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda