Skip to content

Commit 9e11512

Browse files
davidstackioposva
andauthored
docs: add Nuxt note about public environment variables (#1562)
* docs: add Nuxt note about public environment variables * Update docs/nuxt/environment-variables.md --------- Co-authored-by: Eduardo San Martin Morote <[email protected]>
1 parent 97f1be2 commit 9e11512

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/nuxt/environment-variables.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Nuxt VueFire automatically picks up a few environment variables to configure Firebase from your `.env` file. These usually take precedence over other options defined in `nuxt.config.ts`. They usually try to support the existing Firebase environment variables better.
44

5+
Since VueFire config is treated as _Public Runtime Config_, it can also be overridden with [env variables by following the Nuxt convention](https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables). For example, an environment variable named `NUXT_PUBLIC_VUEFIRE_CONFIG_API_KEY=xyz` will override the `config.apiKey`.
6+
Note you still need to provide empty string values to each `config` property that is defined this way.
7+
58
## Admin SDK
69

710
During development, if you are doing SSR, you must provide the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with the path to the service account file. This is usually a JSON file you can download from the Firebase Console > Project Settings > Service Accounts > Generate new private key.

0 commit comments

Comments
 (0)