@liujitcn/kratos-taro-app-core 0.0.57 → 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.57",
10
+ "version": "0.0.59",
11
11
  "type": "module",
12
12
  "files": [
13
13
  "dist",
package/src/utils/http.ts CHANGED
@@ -190,8 +190,9 @@ function handleTokenRefresh(authMode: AuthMode): Promise<void> {
190
190
  if (refreshTokenPromise) return refreshTokenPromise
191
191
  refreshTokenPromise = refreshAccessToken()
192
192
  .catch(async (error) => {
193
+ // 刷新失败后立即撤销本地认证,避免弹窗等待期间后台请求反复提交旧刷新令牌。
194
+ silentClearAuthData()
193
195
  if (authMode === 'required') await promptRelogin()
194
- else silentClearAuthData()
195
196
  throw error
196
197
  })
197
198
  .finally(() => {