提交
This commit is contained in:
1 parent
19de2040d0
commit
3779de12ce
78 files changed
+23068
-13824
No files matched your search
@@ -204,6 +204,12 @@ async function handleUnauthorizedResponse(
|
||||
throw createHttpError(message || $t('httpMsg.unauthorized'), ApiStatus.unauthorized)
|
||||
}
|
||||
|
||||
// refresh-token 接口本身返回 401,说明 refreshToken 已失效,直接登出,避免死锁
|
||||
if (config.url && /\/auth\/refresh-token/.test(config.url)) {
|
||||
triggerLogoutWithDebounce(message)
|
||||
throw createHttpError(message || $t('httpMsg.unauthorized'), ApiStatus.unauthorized)
|
||||
}
|
||||
|
||||
if ((config as ExtendedAxiosRequestConfig)._retry) {
|
||||
triggerLogoutWithDebounce(message)
|
||||
throw createHttpError(message || $t('httpMsg.unauthorized'), ApiStatus.unauthorized)
|
||||
|
||||
Reference in new issue
Block a user