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.