Browse Source

fix(nc-gui): revise signout logic in refreshToken

pull/5458/head
Wing-Kam Wong 2 years ago
parent
commit
5bc2c389a6
  1. 8
      packages/nc-gui/composables/useGlobal/actions.ts

8
packages/nc-gui/composables/useGlobal/actions.ts

@ -46,9 +46,11 @@ export function useGlobalActions(state: State): Actions {
signIn(response.data.token)
}
})
.catch(async (err) => {
message.error(err.message || t('msg.error.youHaveBeenSignedOut'))
await signOut()
.catch(async () => {
if (state.token.value && state.user.value) {
await signOut()
message.error(t('msg.error.youHaveBeenSignedOut'))
}
})
.finally(() => resolve(true))
})

Loading…
Cancel
Save