You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems there is an error initializing App Check when using login server action. Not possible to add the global variable to the window as there is no window on the server
⨯ src/app-check/index.ts (14:19) @ getOrInitializeAppCheck
⨯ ReferenceError: window is not defined
at getOrInitializeAppCheck (./src/app-check/index.ts:14:19)
at getFirebaseApp (./src/auth/firebase.ts:16:27)
at getFirebaseAuth (./src/auth/firebase.ts:23:24)
at loginAction (./src/actions/login.ts:11:69)
digest: "776069970"
12 | // Firebase uses a global variable to check if app check is enabled in a dev environment
13 | if (process.env.NODE_ENV !== 'production') {
> 14 | Object.assign(window, {
| ^
15 | FIREBASE_APPCHECK_DEBUG_TOKEN: process.env.NEXT_PUBLIC_APP_CHECK_DEBUG_TOKEN,
16 | });
17 | }
The text was updated successfully, but these errors were encountered:
You can try to move signInWithEmailAndPassword and getFirebaseAuth call to the client, and pass idToken to the loginAction directly from client instead. Let me know if that works
Hi,
Seems there is an error initializing App Check when using login server action. Not possible to add the global variable to the window as there is no window on the server
The text was updated successfully, but these errors were encountered: