I have Firebase real-time database set up that holds some basic non-sensitive data. I have a website built on NextJS that uses this data as content basically fetching the data via the API. The website is public facing without the need to log in.
I currently have the database rules set to
{
"rules": {
".read": true,
".write": false
}
}
But Google wants me to add some kind of authentication I presume as I received an email saying
We've detected the following issue(s) with your security rules: any user can read your entire database
Given that my website is public facing and simply using the database to add content to the page without the need to log in to the website, is there a way to tell firebase, it is only my website reading the data without having a login or authentication being required or at least done behind the scenes?
I'm new to Firebase and databases in general so don't fully understand the docs or if there is a way to do this.
I know it needs a uid to authenticate, but I keep reading that you need a login to get this. So I don't know if I can somehow set it somewhere in my website that only my website is always logged in or authenticated, so that Firebase can read this every time my website fetches the data.