Browse Source

fix: signout method call correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/9428/head
Pranav C 4 months ago
parent
commit
40b83f0f75
  1. 5
      packages/nc-gui/composables/useApi/interceptors.ts

5
packages/nc-gui/composables/useApi/interceptors.ts

@ -61,7 +61,10 @@ export function addAxiosInterceptors(api: Api<any>) {
// 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)
}

Loading…
Cancel
Save