Skip to content

Commit d551595

Browse files
authored
docs: add Nuxt note about public environment variables
1 parent c8945fc commit d551595

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/nuxt/environment-variables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
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+
The VueFire config is treated as public Nuxt config, which means that any env variable [defined using the Nuxt convention](https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables) will automatically be picked up by Nuxt. This means you can add, for example, `NUXT_PUBLIC_VUEFIRE_CONFIG_API_KEY=xyz` to your `.env` file and the value will populate in your app at runtime. You will still need to provide empty string values to the vuefire config to prevent an error during development.
6+
57
## Admin SDK
68

79
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)