Skip to content

Commit ab09b00

Browse files
Added a check to allow a option to do auth on client only during SSR. This is because we might want do SSR without server authentication, authentication only on the client, since many firestore data are not restricted by authorization or authentication of a user.
1 parent 9e11512 commit ab09b00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/nuxt/src/module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ export default defineNuxtModule<VueFireNuxtModuleOptions>({
208208
}
209209

210210
// loads the user on the current app
211-
addPlugin(resolve(runtimeDir, 'auth/plugin-authenticate-user.server'))
211+
if(!options.auth.clientOnly){
212+
addPlugin(resolve(runtimeDir, 'auth/plugin-authenticate-user.server'))
213+
}
212214
}
213215

214216
// Emulators must be enabled after the app is initialized but before some APIs like auth.signinWithCustomToken() are called

0 commit comments

Comments
 (0)