diff --git a/src/runtime/httpFactory.ts b/src/runtime/httpFactory.ts index 5ab71fd..092156f 100644 --- a/src/runtime/httpFactory.ts +++ b/src/runtime/httpFactory.ts @@ -114,21 +114,6 @@ export function createHttpClient(): $Fetch { async onResponseError({ response }): Promise { if (response.status === 401) { user.value = null; - - const currentRoute = nuxtApp.$router.currentRoute.value; - - if ( - options.redirect.onLogout === false || - options.redirect.onLogout === currentRoute.path || - options.redirect.onAuthOnly === currentRoute.path || - options.globalMiddleware.enabled === true - ) { - return; - } - - await nuxtApp.runWithContext(() => - navigateTo(options.redirect.onLogout as string) - ); } }, };