DEV Community

Discussion on: Connecting React App to firebase

Collapse
 
iamludal profile image
Ludal 🚀

Even if you put your variables in a .env file, they eventually become public since React is client side. So, how is this secure ? Is it dangerous to expose our Firebase API key ? (I've never used Firebase)

Collapse
 
dubeyji profile image
Ashutosh Dubey

It's not dangerous to expose your Firebase api key. It only identifies your project with google server. And for more insight on environment variable you can check this article
create-react-app.dev/docs/adding-c...

Collapse
 
iamludal profile image
Ludal 🚀

Thanks for your reply! 🙌