Skip to content

Commit 6458b3b

Browse files
committed
chore: pending logs
1 parent 617edfe commit 6458b3b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

packages/nuxt/src/runtime/admin/plugin-auth-user.server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
1818
const adminApp = nuxtApp.$firebaseAdminApp as AdminApp
1919
const adminAuth = getAdminAuth(adminApp)
2020

21+
// log('debug', '🔥 Plugin auth user server')
22+
2123
const decodedToken = await decodeUserToken(
2224
getCookie(event, AUTH_COOKIE_NAME),
2325
adminApp
@@ -36,6 +38,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
3638
// for SSR
3739
nuxtApp.payload.vuefireUser = user?.toJSON()
3840

41+
// log('debug', '🧍 User on server', user?.displayName || user?.uid)
42+
3943
// user that has a similar shape for client and server code
4044
nuxtApp[
4145
// we cannot use symbol to index

packages/nuxt/src/runtime/app/plugin.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
4444
// TODO: do we need a randomId?
4545
const appName = `auth:${user.uid}:${randomId}`
4646

47-
log('log', '👤 creating new app', appName)
47+
// log('log', '👤 creating new app', appName)
4848

4949
appCache.set(uid, initializeApp(appConfig.firebaseConfig, appName))
5050
firebaseApp = appCache.get(uid)!

packages/nuxt/src/runtime/auth/plugin.client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ import { defineNuxtPlugin } from '#app'
88
export default defineNuxtPlugin((nuxtApp) => {
99
const firebaseApp = nuxtApp.$firebaseApp as FirebaseApp
1010

11+
// @ts-expect-error: FIXME: type it
1112
VueFireAuth(nuxtApp.payload.vuefireUser)(firebaseApp, nuxtApp.vueApp)
1213
})

src/server/app-check.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,14 @@ export function VueFireAppCheckServer(
5656
log('info', 'Getting Admin AppCheck')
5757
const adminAppCheck = getAdminAppCheck(adminApp)
5858
// NOTE: appId is checked on the module
59-
log(
60-
'info',
61-
`Getting creating token for app ${firebaseApp.options.appId!}.`
62-
)
59+
log('info', `Creating token for app ${firebaseApp.options.appId!}.`)
6360

6461
return adminAppCheck
6562
.createToken(firebaseApp.options.appId!, { ttlMillis })
6663
.then(({ token, ttlMillis: expireTimeMillis }) => {
6764
log(
6865
'info',
69-
`Got AppCheck token from the server: ${token}, expires in ${expireTimeMillis}ms.`
66+
`Got AppCheck token from the server, expires in ${expireTimeMillis}ms.`
7067
)
7168
// expire the token after the ttl
7269
// TODO: verify this is okay

0 commit comments

Comments
 (0)