0

由于我处于开发模式,我的 Firebase 安全规则是:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write;
    }
  }
}

但是除了公开规则之外,我还面临着这个错误。

Error: [cloud_firestore/permission-denied] Missing or insufficient permissions.
    at Object.throw_ [as throw] (http://localhost:7357/dart_sdk.js:5061:11)
    at http://localhost:7357/packages/firebase_core/src/internals.dart.lib.js:81:63
    at _RootZone.runUnary (http://localhost:7357/dart_sdk.js:38511:59)
    at _FutureListener.catchError.handleError
    (http://localhost:7357/dart_sdk.js:33726:33)
    at handleError (http://localhost:7357/dart_sdk.js:34281:51)
    at Function._propagateToListeners (http://localhost:7357/dart_sdk.js:34307:17)
    at _Future.new.[_completeError] (http://localhost:7357/dart_sdk.js:34157:23)
    at async._AsyncCallbackEntry.new.callback
    (http://localhost:7357/dart_sdk.js:34193:31)
    at Object._microtaskLoop (http://localhost:7357/dart_sdk.js:38778:13)
    at _startMicrotaskLoop (http://localhost:7357/dart_sdk.js:38784:13)
    at http://localhost:7357/dart_sdk.js:34519:9

卡住。请帮忙!注意:我也试过允许读,写:如果为真;

4

1 回答 1

0

正如@Peter Koltai 所提到的,启用应用程序检查是这里的问题。最近添加了对 Firestore 的 App Check 的支持,更多详情请查看此处

于 2021-12-14T10:17:42.677 回答