Your Cloud Firestore database has insecure rules - flutter firebase db

Viewed 411

I developed a flutter app, I use Firebase as my DB, which means that any user can write and read from my DB,

I'm getting the following email every couple of hours.

[Firebase] Your Cloud Firestore database has insecure rules

    We've detected the following issue(s) with your security rules:
any user can read your entire database
any user can write to your entire database

Which is exactly what I want, since I want my app to be available to unregistered users.

Did I missed something? is my app is actually insecure?

The access to the DB is done through the app with filters only user specific data.

Is there a way to make my more secure, and keeping it available for unregistered users?

I also not sure why allowing only registered user will make it insecure, since any one can register to the app with a click of a button.

Please shed some light on this issue.

2 Answers

You will definitely need to learn how to use security rules. A full discussion is beyond the scope of a single answer, but you should know that security rules allow you to specify who (signed in through Firebase Auth) can read and write which documents and collections. Not using security rules at all is a massive security hole.

Related