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) signIn(response.data.token)
} }
}) })
.catch(async (err) => { .catch(async () => {
message.error(err.message || t('msg.error.youHaveBeenSignedOut')) if (state.token.value && state.user.value) {
await signOut() await signOut()
message.error(t('msg.error.youHaveBeenSignedOut'))
}
}) })
.finally(() => resolve(true)) .finally(() => resolve(true))
}) })

Loading…
Cancel
Save