2

I received the following message from Firebase. What am I supposed to do?

You chose to start developing in Test Mode, which leaves your Realtime Database instance completely open to the Internet. Because this choice makes your app vulnerable to attackers, your database security rules were configured to stop allowing requests after the first 30 days. In 5 day(s), all client requests to your Realtime Database instance will be denied. Before that time, please update your security rules to allow your app to function while appropriately protecting your data. Analysis is run daily; if you've modified your rules in the last 24 hours those changes may not be accounted for.

And this is what I found in databases in Firebase

{
  "rules": {

    ".read": "now < 1602709200000",  // 2020-10-15

    ".write": "now < 1602709200000",  // 2020-10-15
  }
}
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Rayyan Sharif
  • 31
  • 1
  • 2

2 Answers2

3

Set this conditions in Realtime Database Rules:

{
  "rules": {
    "users": {
      "$uid": {
        ".read": "auth != null && auth.uid == $uid",
        ".write": "auth != null && auth.uid == $uid",
      }
    }
  }
}
1

You need to set some security rules for your database other than the current ones. You should read about how to define them.

Your current rules mean that everyone can read and write to your database if their requests are sent before 15th October 2020. So unless you set them in the next 5 days, your service will be unavailable after that.

DivisionByZero
  • 148
  • 2
  • 6