How to allow only my app to access firebase without a login?

Sourav Kanta picture Sourav Kanta · Jul 15, 2016 · Viewed 9.9k times · Source

I am storing my app's data on Firebase and this being my first project on Firebase is proving to be much more difficult than I thought. I have gone through the official documentation and it says that we can login a user with their email and password or use other login options like Google or Facebook etc. However I don't want user's to login to my application but only read and write data to firebase if they are using my app. Right now I am using public rules for my firebase but then anyone with a reference to my firebase URL can read and write to the database. How do I overcome this?

Thanks in advance.

Answer

Morad picture Morad · Jul 15, 2017

Enable Anonymous sing-in provider under Sing-in Method under Authentication tab in your Firebase Console and use firebase anonymous authentication