Browse Source
fix: when the 'refreshToken' expires, it does not re-authenticate (#4231)
pull/4237/head
Li Kui
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
0 deletions
-
packages/effects/request/src/request-client/preset-interceptors.ts
|
|
|
@ -60,6 +60,8 @@ export const authenticateResponseInterceptor = ({ |
|
|
|
client.refreshTokenQueue.forEach((callback) => callback('')); |
|
|
|
client.refreshTokenQueue = []; |
|
|
|
console.error('Refresh token failed, please login again.'); |
|
|
|
await doReAuthenticate(); |
|
|
|
|
|
|
|
throw refreshError; |
|
|
|
} finally { |
|
|
|
client.isRefreshing = false; |
|
|
|
|