Have 2 apps which are in one project in Firebase. I have tried different rules by searching firebase but either they caused issues or they didn't work.
The rules I have set in the project are as follows:
{
"rules": {
".read": "auth != null",
".write": "auth != null",
"DriversOnline":{
".indexOn":["g"],
},
"Requests":{
".indexOn":["driver"]
}
}
}
The email I am receiving from firebase states:
[Firebase] Your Realtime Database 'project_name' has insecure rules
We've detected the following issue(s) with your security rules: any logged-in user can read your entire database any logged-in user can write to your entire database
Without strong security rules, anyone who has the address of your database can read / write to it, leaving your data vulnerable to attackers stealing, modifying, or deleting data as well as creating costly operations.
I am not sure what else I can do, as I want the app to be able to write and read to/from the database.
Any ideas?