-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extracting Firebase config into environment variables #2
Comments
I'm with the same problem... |
Problem still here in 2019 |
Problem still here in 2020, simply nuxt is just a mess in terms of security, it exposes everything what's possible and there is no proper explanation how to get rid of this problem. |
The problem still persists in 2021, I really need the right way of doing it |
Problem still here in 2022 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am very fond of this project by the way.
Is there a specific reason that
services/fireinit.js
doesn't use the.env
variables? It seems like the firebase config object could useprocess.env.API_KEY
and so forth as values instead of the copied string literals that will be the same as in the .env file already.It would look something like this:
I used
@nuxtjs/dotenv
to facilitate using .env for this on a side project. I'm not sure what happens on the Firebase console side as far as configuring environment variables, but I was able to get a working project deployed on Firebase hosting myself without any extra effort besides setting up the aforementioned. I know Netlify, a similar service to Firebase hosting, offers environment variable configuration and I am sure there must be a similar solution for Firebase and other hosting services.I could make a PR if you are interested!
Again, awesome project!
The text was updated successfully, but these errors were encountered: