Код: Выделить всё
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
Код: Выделить всё
$firestore = new FirestoreClient([
'projectId' => env('firebase.project.id'),
'keyfileName' => env('firebase.key.file')
]);
$collection = $firestore->collection('users');
$document = $collection->document($uid);
//this one triggers the permission error
$secret_key = $document->snaphot->get('secret_key');
Код: Выделить всё
PERMISSION_DENIED: Missing or insufficient permissions.
Код: Выделить всё
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth.uid != null;
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/792 ... ion-denied
Мобильная версия