Firebase Security Rules
If you are using firebase in your android project you may receive an email telling you, You are not safe, you will be stolen from bad guys …
This is an important email you should keep it in your mind and you must secure your firebase real-time database so how could we do this step
First step you will create any secret key using the next website for example the key you will use is [xyzzEE20] in our project give this key to your developers working on the same project android, ios …etc
You should have a project in your firebase now got to your firebase console and open authentication->Sigin-method and enable Anonymous
Second step we will add our code to sing-in users Anonymous in our app side
In your activity or fragment
Now your app ready to sign-in users to your firebase realtime-database and it will be like next …
Final step updating your firebase reules like as shown below
if you have more children you should add them to your Rules to give access to all users logged-in Anonymously, then now you can access your child and take any action [update - delete .. ]… Run your project and have a fun day with your code
You can read this article and see the gists on Medium website.
Any feedback is welcome and appreciated :)