Read Firebase API keys from .env
See original GitHub issueI’m sure this has been discussed before but I can’t seem to find the thread. Anyway, I’m trying to set the config from process.env inside nuxt.config.js but the value seems to be empty.
Is there another way to do this, say via plugin?
firebase: {
config: {
apiKey: process.env.apiKey,
authDomain: process.env.authDomain,
databaseURL: process.env.databaseURL,
projectId: process.env.projectId,
storageBucket: process.env.storageBucket,
messagingSenderId: process.env.messagingSenderId,
appId: process.env.appId,
measurementId: process.env.measurementId
},
services: {
auth: true
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Learn about using and managing API keys for Firebase - Google
An API key is a unique string that's used to route requests to your Firebase project when interacting with Firebase and Google services....
Read more >Environment variables not working for hiding firebase API key
I want to hide my firebase API key with ...
Read more >env firebase API key returns undifined - Netlify Support Forums
Some reason I can`t access the env variables in firebase-config. meh .env (in root folder / ) REACT_APP_API_KEY = asdheyhohellothankyou1 ...
Read more >Firebase Functions: React users need to stop storing sensitive ...
Many of you are reading this because you are an awesome Front-End Developer ... Well, if you have sensitive API keys and you...
Read more >Using secrets | Cloud Functions Documentation
You can use Secret Manager to securely store API keys, passwords, and other sensitive information. This guide shows you how to configure Cloud...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
apologies, noob mistake. I forgot to add
require('dotenv').config()
at the top of the nuxt.config.jsThanks Mike for responding and swiftly too, I’ll look at it now.
On Tue, 6 Oct 2020, 4:11 pm mikoy, notifications@github.com wrote: