I am new to Firebase database and I am having trouble understanding the security rules.
Example Rule 1:
{
"rules": {
".read": true,
".write": true
}
}
The above rule allows everyone to read and write the database.
Example Rule 2:
{
"rules": {
"users": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
}
}
The above rule allows only the authenticated user to read and write only their own data.
My question is, if I set the security rule of my database to Example Rule 1 and develop my app in such a way that only the authenticated users can read and write the data, whats wrong with it?
Whats wrong with implementing the security rules in the app itself?