Skip to content

Commit 5f140cd

Browse files
committed
feat(app-check): warn user against production leak appcheck
1 parent f7b956d commit 5f140cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/nuxt/src/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ export default defineNuxtModule<VueFireNuxtModuleOptions>({
107107
logger.debug(
108108
`Using app check debug token from env variable "${process.env.FIREBASE_APPCHECK_DEBUG_TOKEN}"`
109109
)
110+
if (process.env.NODE_ENV === 'production' && options.appCheck.debug) {
111+
logger.warn(
112+
'You are using a debug token in production, DO NOT DEPLOY THIS BUILD. If you do, you will leak your debug app check token.'
113+
)
114+
}
110115
options.appCheck.debug = process.env.FIREBASE_APPCHECK_DEBUG_TOKEN
111116
}
112117
addPlugin(resolve(runtimeDir, 'app-check/plugin.client'))

0 commit comments

Comments
 (0)