From 26aaa45dedec3fd6df94a60d6946e259ab42aa54 Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 11 Oct 2023 17:24:07 +0200 Subject: [PATCH] fix: `navigateTo` throws error on local provider (#540) --- src/runtime/composables/local/useAuth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/composables/local/useAuth.ts b/src/runtime/composables/local/useAuth.ts index 8c9fb366..bf4b67d7 100644 --- a/src/runtime/composables/local/useAuth.ts +++ b/src/runtime/composables/local/useAuth.ts @@ -39,7 +39,7 @@ const signIn: SignInFunc = async (credentials, signInOptions, const { callbackUrl, redirect = true } = signInOptions ?? {} if (redirect) { const urlToNavigateTo = callbackUrl ?? await getRequestURLWN(nuxt) - return navigateTo(urlToNavigateTo) + return navigateTo(urlToNavigateTo, { external: true }) } } @@ -59,7 +59,7 @@ const signOut: SignOutFunc = async (signOutOptions) => { const { callbackUrl, redirect = true } = signOutOptions ?? {} if (redirect) { - await navigateTo(callbackUrl ?? await getRequestURLWN(nuxt)) + await navigateTo(callbackUrl ?? await getRequestURLWN(nuxt), { external: true }) } return res @@ -94,7 +94,7 @@ const getSession: GetSessionFunc = async (getSessionO if (onUnauthenticated) { return onUnauthenticated() } else { - await navigateTo(callbackUrl ?? await getRequestURLWN(nuxt)) + await navigateTo(callbackUrl ?? await getRequestURLWN(nuxt), { external: true }) } }