Sometimes, when I visit my web app, I get the following error in the console:
a: null
code: "auth/invalid-api-key"
message: "Your API key is invalid, please check you have copied it correctly."
Other times I don't have a problem and the app works fine. The problem seems to be to do with my environment variables, saved in my .env file. I've console.log'd them and most of them appear to have disappear whenever I get the above error. They are present at other times.
I'm running a hosted (React) Firebase app and using the Firebase Auth on a back-end node.js server hosted on Heroku.
question from:
https://stackoverflow.com/questions/65889220/environment-variables-disappear-when-firebase-hosted-react-site-is-accessed 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…