react-firebase-authentication icon indicating copy to clipboard operation
react-firebase-authentication copied to clipboard

How can i hide config values?

Open juaniarguello opened this issue 4 years ago • 2 comments

One question, are the firebase config values ​​(ie the apiKey, appId, etc ..) meant to be exposed or should we hide them in some way? Thank you!

juaniarguello avatar Nov 27 '20 22:11 juaniarguello

If you are using version control system like git, It is a secure way to create .env file in the root of the project and store those secrets in there. Don't forget to add .env in .gitignore

mejustdev avatar Dec 26 '20 10:12 mejustdev

They are by design not able to hide for anyone with skills to debunk your code. What you must do is infors Website restrictions and Authorised JavaScript origins from https://console.developers.google.com/apis/credentials/ So that the api key only can be used from your Doman!

erikswed avatar Dec 26 '20 20:12 erikswed