diff --git a/src/runtime/composables/useSanctumAuth.ts b/src/runtime/composables/useSanctumAuth.ts index fc12ae2..61d3d4a 100644 --- a/src/runtime/composables/useSanctumAuth.ts +++ b/src/runtime/composables/useSanctumAuth.ts @@ -61,15 +61,14 @@ export const useSanctumAuth = (): SanctumAuth => { if (options.redirect.keepRequestedRoute) { const route = useRoute(); const requestedRoute = route.query.redirect as string | undefined; - if (requestedRoute) { await nuxtApp.runWithContext(() => navigateTo(requestedRoute)); + return; } } if (options.redirect.onLogin) { const redirect = options.redirect.onLogin as string; - await nuxtApp.runWithContext(() => navigateTo(redirect)); } }