I have a Firebase Realtime database I'm using in a learning course project I'm building. I just received an email warning that it will expire in 5 days. Here's what it says:
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.
I don't know what that means or what to do to fix it. The email has a couple of buttons: one to view the docs and the other to edit the rules.
The docs show various rules options but I haven't a clue which to choose. When I click on the edit rules button it shows some code with comments I think indicating the expiration date but I don't know if or how I would change that code to for example add another 30 days.
I'm the only user on the database but the course has not yet gotten to adding authorization. Some of the answers I read recommended applied to Firestore instead of Realtime database and also suggested rules that were not recommended in the documents because any logged in user then has read and write access to the entire database. What should I do to fix this?
{ "rules": { ".read": "now < 1620532800000", // 2021-5-9 ".write": "now < 1620532800000", // 2021-5-9 } }
I'm usingto separate the code section. I don't know how I can use your console.log example. I'm not sure how all those numbers relate to the commented dates. Can you help me with that? – user258081 May 05 '21 at 03:17