Firebase Firestore有不安全的规则警告 - 我如何修复我的应用程序没有身份验证

发布于 2025-01-26 18:08:27 字数 325 浏览 2 评论 0原文

我的Firestore有以下规则:

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

我的应用程序没有身份验证,它仅显示数据。

Firestore唯一写的是简单的电子邮件注册表格,我希望任何人都可以提交,以及从后端发生的购物车检查订单时。

我需要为此方案设置什么规则?

My firestore has the following rules:

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

My app has no authentication, it is only displaying data.

The only time the firestore is written to is in a simple email sign up form that I want anyone to be able to submit and when an order is checked out from the cart that happens on the back end.

What rules do I need to set for this scenario?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文