@liujitcn/kratos-uni-app-core 0.0.58 → 0.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "type": "git",
8
8
  "url": "git@github.com:liujitcn/kratos-admin.git"
9
9
  },
10
- "version": "0.0.58",
10
+ "version": "0.0.59",
11
11
  "type": "module",
12
12
  "files": [
13
13
  "dist",
package/src/utils/http.ts CHANGED
@@ -272,10 +272,10 @@ function handleTokenRefresh(authMode: AuthMode) {
272
272
  isRefreshing = true
273
273
  refreshTokenPromise = refreshAccessToken()
274
274
  .catch(async (error) => {
275
+ // 刷新失败后立即撤销本地认证,避免弹窗等待期间后台请求反复提交旧刷新令牌。
276
+ silentClearAuthData()
275
277
  if (authMode === 'required') {
276
278
  await promptRelogin()
277
- } else {
278
- silentClearAuthData()
279
279
  }
280
280
  throw error
281
281
  })