Skip to content

Signout with redirect causes flash of login page #1030

@hendrasan

Description

@hendrasan

Environment


  • Operating System: Darwin
  • Node Version: v20.18.1
  • Nuxt Version: 3.17.3
  • CLI Version: 3.25.1
  • Nitro Version: 2.11.12
  • Package Manager: npm@11.2.0
  • Builder: -
  • User Config: app, compatibilityDate, devtools, css, imports, vite, modules, fonts, shadcn, components, icon, runtimeConfig, auth, i18n
  • Runtime Modules: shadcn-nuxt@2.1.0, @nuxt/icon@1.13.0, @nuxtjs/i18n@9.5.4, @sidebase/nuxt-auth@0.10.1, @nuxt/fonts@0.11.4
  • Build Modules: -

Reproduction

Describe the bug

I have:

/ -> landing page
/login -> login page

And after login, when I logout, I want to log the user out to landing page, so I do this

await signOut({ callbackUrl: '/' })

But apparently, what it does is, the user is shown the login page for a bit, before being redirected to landing page.

Can we somehow change it? I tried this but it doesn't work

await signOut()
await navigateTo('/')

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug that needs to be resolvedneeds-reproductionAction needed: A valid reproduction of the issue needs to be added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions