Hide api keys

Hello, can someone help how to hide firebase api keys from github using react js #❓help-forum
3 Replies
dys 🐙
dys 🐙4mo ago
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.
ἔρως
ἔρως4mo ago
also, you store the api key in git secrets and when you deploy, you create the .env file from it
bahatiphilemon
bahatiphilemonOP4mo ago
Thanks for the help
Want results from more Discord servers?
Add your server