ahsankhatri / firestore-php

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

How to send auth property in FirebaseClient creation? #8

Closed rmachado33 closed 5 years ago

rmachado33 commented 5 years ago

Hi, I'm adding the auth property in the FirestoreClient constructor function to fulfill a security rule in my Firestore project in this way,

$this->firestoreClient = new FirestoreClient('my_project_id', 'my_api_key', [
            'database' => '(default)',
            'auth' => '{ uid: "some_number" }'
        ]);

but I always get 'PERMISSION DENIED' 'Missing or insufficient permissions'.

What is the proper way to add this to the initial config object?

ahsankhatri commented 5 years ago

What method of authentication you're invoking? See the authentication document here

ahsankhatri commented 5 years ago

Closing due to inactivity.