Hide api keys
Hello, can someone help how to hide firebase api keys from github using react js #❓help-forum
3 Replies
You put the API keys in a
.env
file containing environment variables which you import into your program using process.env.VARIABLE_NAME
or import.meta.env.VARIABLE_NAME
if you're in Vite.
You do not commit the .env
file into git
.also, you store the api key in git secrets
and when you deploy, you create the
.env
file from itThanks for the help