Browse Source

fix: when the 'refreshToken' expires, it does not re-authenticate (#4231)

pull/4237/head
Li Kui 2 years ago
committed by GitHub
parent
commit
df7757d001
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      packages/effects/request/src/request-client/preset-interceptors.ts

2
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;

Loading…
Cancel
Save