且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何只允许一个管理员用户编写Firebase数据库?

更新时间:2023-11-28 08:22:46

This should work:

{
  "rules": {
    ".read": true,
    ".write": "auth.uid === 'dJrGShfgfd2'"
  }
}

Everyone in the world will be able to read the data, but only the user with UID dJrGShfgfd2 (and processes with administrative access) can write the data.