【问题标题】:set firestore security rule without auth在没有身份验证的情况下设置 Firestore 安全规则
【发布时间】:2021-04-08 20:33:57
【问题描述】:

我正在构建一个电子商务应用程序,没有 AUTH 或付款方式(当您收到商品时付款)...所以我将在本地存储中设置收藏夹和购物篮商品(反应原生) 对于订单,用户将其添加到 Firestore 文档(订单文档)中 我有两个文档产品和订单 所以我想设置我的firestore安全规则以允许从产品文档中读取 并且只写订单文件 这样做安全吗

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

【问题讨论】:

    标签: firebase react-native authentication google-cloud-firestore firebase-security


    【解决方案1】:

    我认为你不能做这样的事情,因为当你想设置规则时,出于安全原因,规则将在 30 天后自动再次更改。

    新年快乐

    (对不起我的英语不好)

    【讨论】:

      猜你喜欢
      • 2019-06-02
      • 2021-07-23
      • 2018-04-04
      • 2021-07-05
      • 2023-03-21
      • 2019-10-16
      • 1970-01-01
      • 2019-10-17
      相关资源
      最近更新 更多