The read failed: Permission denied error in firebase

后端 未结 1 1781
感情败类
感情败类 2020-12-01 22:07

I am following a tutorial from this link for firebase in android. I am just trying to add a name and address to the firebase and reflect the added name in all the app. I tri

相关标签:
1条回答
  • 2020-12-01 23:03

    That tutorial was created for the "legacy" Firebase on www.firebase.com. When you create a project there, it is by default readable and writable by anyone.

    I guess that you created your project on the new Firebase Console. Projects there are by default only readable and writable by authenticated users.

    The simplest workaround for the moment (until the tutorial gets updated) is to go into the Database panel in the console for you project, select the Rules tab and replace the contents with these rules:

    {
      "rules": {
        ".read": true,
        ".write": true
      }
    }
    

    This makes your new database readable and writeable by everyone, like in the legacy Firebase. Be certain to secure your database again once you're done with the tutorial, otherwise somebody is likely to start abusing it.

    0 讨论(0)
提交回复
热议问题