nuxt-community / firebase-module

🔥 Easily integrate Firebase into your Nuxt project. 🔥
https://firebase.nuxtjs.org
MIT License
641 stars 98 forks source link

Missing or insufficient permissions when using with Firebase Firestore #510

Closed PrajapatiDhara1510 closed 3 years ago

PrajapatiDhara1510 commented 3 years ago

Version

@nuxtjs/firebase: "^7.5.0" firebase: "^8.2.9" nuxt: "^2.15.0"

I have followed all steps as mentioned in this link.

But when I try to write to the database it is showing me Missing or insufficient permissions. My security rules are as below

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    allow read;
    allow write: if request.auth != null;
  }
}

It should work but not working. If I delete if request.auth != null then it is working so I have no idea what is wrong with it. Even I downloaded demo from git and replaced my credentials. there also is showing same error. Can anyone please guide me.

dosstx commented 3 years ago

It might be because your user auth object is still null at the time of the database write. I'm seeing the same problems on my end,

lupas commented 3 years ago

Hey @dhara15101991

Sorry for the late response - Is this still an issue?

PrajapatiDhara1510 commented 3 years ago

Hello @lupas Solved it