diff --git a/packages/nc-gui/composables/useApi/interceptors.ts b/packages/nc-gui/composables/useApi/interceptors.ts index ae5e1a04cd..660ef2a205 100644 --- a/packages/nc-gui/composables/useApi/interceptors.ts +++ b/packages/nc-gui/composables/useApi/interceptors.ts @@ -61,7 +61,10 @@ export function addAxiosInterceptors(api: Api) { // Logout user if token refresh didn't work or user is disabled if (error.config.url === '/auth/token/refresh') { - state.signOut(undefined, true) + await state.signOut({ + redirectToSignin: !route.value.meta.public, + skipApiCall: true, + }) return Promise.reject(error) }