Fix Oauth redirect when not logged in

This commit is contained in:
corsacca 2026-05-04 13:41:12 +01:00
parent 5228c12747
commit 322da8aa56

View file

@ -52,7 +52,10 @@ export const useAuth = () => {
const redirectTo = route.query.redirect as string
if (redirectTo && redirectTo.startsWith('/')) {
await navigateTo(redirectTo)
// Force a full-page navigation so server-only routes (e.g. /oauth/authorize)
// are reached. SPA navigation falls through the Nuxt pages router and hits
// the [...slug].vue catch-all, which never invokes the server handler.
await navigateTo(redirectTo, { external: true })
} else {
await navigateTo('/')
}