简体   繁体   English

Firebase - 如何设置安全规则,只有登录用户才能读写?

[英]Firebase - How to set security rules so that only logged in users can read and write?

Firebase - How to set security rules so that only logged in users can read and write for a specific table? Firebase - 如何设置安全规则以便只有登录用户才能读写特定表?

For the logins I'm using firebase built in authentication.对于登录,我使用 firebase 内置身份验证。

by changing the rules as follows通过改变规则如下

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth != null;
    }
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何设置我的 firebase 规则,以便只有内容所有者可以读取和写入他们的数据? - How can I set up my firebase rules so only content-owners have read and write to their data? 如何定义只有登录用户才能读取和写入所有 collections 和子集合的安全规则? - How do I define the security rules where only logged in user can read and write all of the collections and subcollection? 设置 Firebase Firestore 安全规则,以便只有用户可以 CRUD 自己的数据,其他所有内容都将被忽略 - Setting Firebase Firestore security rules so only users can CRUD their own data and all else is ignored firebase中如何给用户设置规则? - How to set rules to users in firebase? 即使规则在 Firebase 实时数据库中设置为 false,我如何以管理员身份读写 - how can I read and write as an admin even if the rules set to false in Firebase Realtime Database Firebase 安全规则 (.read) - Firebase security rules (.read) 添加安全规则,让用户只能在 Firebase 中读取包含其 uid 的数据 - Add security rules to let users read data that contains their uid only in Firebase 如何在 firebase firestore 设置规则中授予读写权限 - How can give access to read but not write in firebase firestore settting rules firebase 安全规则只对一个特定字段进行写访问 - firebase security-rules write access to only one specific field 如何添加 Firebase 安全规则以检查登录用户 email 是否在列表中 - How to add a Firebase security rule for checking if logged in users email is in a list
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM