-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
Environment
Nuxi 3.0.0-rc.13
RootDir: /Users/nook/work/tls-interim-front
Nuxt project info: (copied to clipboard)
- Operating System:
Darwin - Node Version:
v18.12.0 - Nuxt Version:
3.0.0-rc.13 - Nitro Version:
0.6.1 - Package Manager:
npm@8.19.2 - Builder:
vite - User Config:
typescript,css,modules,auth,build,googleFonts,runtimeConfig - Runtime Modules:
@nuxtjs/tailwindcss@6.1.3,@nuxtjs/google-fonts@3.0.0-1,@nuxtjs/svg@0.4.0,@pinia/nuxt@0.4.3,floating-vue/nuxt,@sidebase/nuxt-auth@0.0.1-beta.5 - Build Modules:
-
Reproduction
No response
Describe the bug
Given I am authenticated:
When trying to guard a route, the session is always null (unauthenticated) on server side, but available on client side
definePageMeta({
middleware: [async () => {
const { status } = await useSession();
console.log(status.value); // 'unauthenticated' on server, 'authenticated' on client
if (status.value === 'authenticated') {
return true;
} else {
console.log('hmm not ok');
console.log(status.value); // 'unauthenticated' on server
}
}],
});Additional context
No response
Logs
No response
Metadata
Metadata
Assignees
Labels
No labels