-
-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Labels
questionA question about NuxtAuthA question about NuxtAuth
Description
Environment
| Operating system | macOS 25.2.0 |
| CPU | Apple M1 Pro (8 cores) |
| Node.js version | v24.4.1 |
| nuxt/cli version | 3.32.0 |
| Package manager | pnpm@10.14.0 |
| Nuxt version | 4.2.2 |
| Nitro version | 2.12.9 |
| Builder | vite@7.3.1 |
| Config | auth, compatibilityDate, components, css, devtools, fonts, hooks, i18n, modules, runtimeConfig, vite |
| Modules | @nuxt/eslint@1.12.1, @nuxt/fonts@0.12.1, @nuxtjs/i18n@10.2.1, @sidebase/nuxt-auth@1.1.1, @pinia/nuxt@0.11.3, floating-vue/nuxt@5.2.2 |
Reproduction
.
Describe the bug
I've tried this:
<script setup>
const { getSession, refresh } = useAuth()
// Attempt 1
console.log('1');
await getSession();
console.log('2');
// Attempt 2
await callOnce(async () => {
console.log('1');
await getSession();
console.log('2');
});
// Attempt 3
await useAsyncData(`account-settings-general-${locale.value}`, async () => {
console.log('1');
await getSession();
console.log('2');
return true;
});
</script>And also with refresh instead of getSession.
If I do a client side navigation, it works and I see 1, 2 in the browser console.
If I do a hard refresh, I see 1, 2 in the terminal, but page never load and I have a spinner on the tab.
Additional context
No response
Logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionA question about NuxtAuthA question about NuxtAuth