@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 +1 -1
- package/src/utils/http.ts +2 -2
package/package.json
CHANGED
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
|
})
|