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