Skip to content

Commit

Permalink
fix: navigateTo throws error on local provider (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Oct 11, 2023
1 parent 6434f53 commit 26aaa45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/composables/local/useAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const signIn: SignInFunc<Credentials, any> = async (credentials, signInOptions,
const { callbackUrl, redirect = true } = signInOptions ?? {}
if (redirect) {
const urlToNavigateTo = callbackUrl ?? await getRequestURLWN(nuxt)
return navigateTo(urlToNavigateTo)
return navigateTo(urlToNavigateTo, { external: true })
}
}

Expand All @@ -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
Expand Down Expand Up @@ -94,7 +94,7 @@ const getSession: GetSessionFunc<SessionData | null | void> = async (getSessionO
if (onUnauthenticated) {
return onUnauthenticated()
} else {
await navigateTo(callbackUrl ?? await getRequestURLWN(nuxt))
await navigateTo(callbackUrl ?? await getRequestURLWN(nuxt), { external: true })
}
}

Expand Down

0 comments on commit 26aaa45

Please sign in to comment.