Firebase Rules Setup
In order to use firebase services like database and storage, you need to provide some additional set of rules to make it secure. Here is a quick tutorial for it.
Setting up Database rules:
- Navigate to your Firebase project.
- On the dashboard you can see the database, click open.
3. Click create database to create new database if you don’t have it.
4. Set the database rule for production mode and click next.
5. After that you need to select the location for your database and click done.
It will take a while to set up so please be patient
6. After the database is created navigate to the rules tab of the database.
7. Replace the default rule with the given rule and hit publish.
Rule: allow read, write: if request.auth.uid != null
Setting up Storage rules:
1. Navigate to the Storage option in the dashboard.
2. Set secure rules for the Firebase storage.
Click next and then set the region and click done.
3. Navigate to the rules tab of the Storage.
You can leave the default rule as it is or make it more secure and then press publish.