diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 9a17679a..2381016d 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -208,7 +208,9 @@ export default defineNuxtModule({ } // loads the user on the current app - addPlugin(resolve(runtimeDir, 'auth/plugin-authenticate-user.server')) + if (!options.auth.clientOnly) { + addPlugin(resolve(runtimeDir, 'auth/plugin-authenticate-user.server')) + } } // Emulators must be enabled after the app is initialized but before some APIs like auth.signinWithCustomToken() are called