Skip to content

Commit 60f7839

Browse files
committed
docs: env variables
1 parent ef76458 commit 60f7839

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ function sidebarNuxt(): SidebarGroup {
198198
text: 'Deployment',
199199
link: '/nuxt/deployment',
200200
},
201+
{
202+
text: 'Environment Variables',
203+
link: '/nuxt/environment-variables',
204+
},
201205
],
202206
}
203207
}

docs/nuxt/environment-variables.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Environment Variables
2+
3+
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 better support the existing Firebase environment variables.
4+
5+
## Admin SDK
6+
7+
If you are doing SSR, you will need to provide the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with the path to the service account file. This is usually a JSON file that you can download from the Firebase Console > Project Settings > Service Accounts > Generate new private key.
8+
9+
```
10+
GOOGLE_APPLICATION_CREDENTIALS=service-account.json
11+
```
12+
13+
Make sure **to exclude this file from your version control system**.
14+
15+
## AppCheck
16+
17+
If you are using AppCheck, you can specify the `FIREBASE_APPCHECK_DEBUG_TOKEN` environment variable to use a debug token in development. This is useful in **protected** CI environments or if you run multiple Firebase projects on your machine and don't want to rely on the local generation of the debug token
18+
19+
```
20+
FIREBASE_APPCHECK_DEBUG_TOKEN=********-****-****-****-************
21+
```
22+
23+
These can be generated on the Firebase Console > AppCheck > Apps > Manage Debug Tokens.

0 commit comments

Comments
 (0)