Enabling access to the Firebase Database

Firebase provides us with a lot of security features. By default, an unknown user is not allowed to access data in the database from any frontend application. For our use case, we actually want everyone to have access to the data that we put on our database. To enable this, modify the database.rules.json file to have the following contents :

    {
     "rules": {
        ".read": "auth == null",
        ".write": "auth != null"
      }
    }

Now, everyone can read our data, and anyone who is authorized can write to our database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.142.128