Firebase Rules Generator for Realtime database

Firebase realtime database is the most useful thing for developers who want to make their own database but they have no knowledge of php and mysql. But securing firebase database is a majior problem for developers because sometime some other person uses database for his personal purpose and also this person can modify or delete data, which can cause major problem to developers.



So to overcome this problem I researched on many website and many apps but no one was providing a trustworthy solution. 
Then one day when i was surfing on sketchub, I found a app named "Firebase Rules Generator"  made by Md. S. Alam , This app can generate perfect codes for every situation in realtime database and also this app is so easy to use that even a person with no coding language can use it.


How to use
Download this app from link given in this post. Then open this app and it will ask ermission for storage 


( This permission is used to save you rules in a file for backup )


Then a new interface will open. You will find 2 options in bottom of the app. Both options are described in this post.



Option 1 :  For all path
This is an easy option and you can use if your app is in beginning stage. To use this option click on it.

    
New option will appear when you choose this option. 

 Here you''ll find two options First for reader and second for writer. Click on reader option and select you appropriate choice. 
 Then click on writer option and choose the writer choice.
 for example i have selected anyone for the reader of the database 

 
 and for reader of this databse i have selected only you. 
 Then my security rules will look like this. 

 click on copy icon and  your rules will be copied

Definations
1. Only you : means no one can read the database.
2. Anyone : means any user can read data no matter if he is logged in or not
3. Authenticated : means only the user which has a account in your app can read the databse
Custom (uid) : means only selected users can read the database.

Note these definations are also valid for write option.


How to get uid in firebase
To get uid in firebase you'll need to enable authentication. Then create a new user and then you'll see a icon of copy, click on this icon and the selected user uid will be copied.


Option 2 : For custom paths
This option is used to give advanced security to database
Click on this option then new option will appear. enter your path name and  click on add icon.For example my desired path was user where i store all users information then i'll write it in path field.

Your path name is the path where you'll store all values.

Customise the rules for your path. 

First rule is ready, you can add as many rules you want with this option, just fill the edittext option and add it.



 After generating all rules click on copy option and your rules will be copied. 
All these rulews are only meant for realtime databse and if you want same type of app for firebase storage then you can suggest me about it in comments of this post(no need to login). 


Download
You can download it forom sketchub or from this mediafirte link.
Previous Post Next Post