ahsankhatri / firestore-php

Firestore PHP Client (without gRPC extension)
MIT License
62 stars 57 forks source link

Error: PERMISSION_DENIED: Missing or insufficient permissions #3

Closed ansidev closed 5 years ago

ansidev commented 5 years ago

I tried to write to FireStore but the server responded 403 PERMISSION_DENIED: Missing or insufficient permissions.

The database rule is:

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth.uid != null;
    }
  }
}

If I change rule to allow read, write: if true; (turn off database security), it's OK.

ahsankhatri commented 5 years ago

Please update your dependency with version 2.0.0 which i've added support for Authentication, let me know your thoughts on this.

ansidev commented 5 years ago

I'm sorry for the late response.

Firstly, the new version doesn't resolve the problem or maybe I missed something.

After reviewing the code base, there are some problems:

So after all, I think this issue should be opened again.

ahsankhatri commented 5 years ago

Actually i was developing on other location and i finished it with copying entire src directory, i had to use git mv for those renaming, and appology for documentation of few sections.