Skip to content

Commit

Permalink
fix(oidc): number timer increase
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Sep 26, 2024
1 parent ad18d60 commit 782654d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/oidc-client/src/renewTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ export async function renewTokensAndStartTimerAsync(
export const autoRenewTokens = (oidc: Oidc, expiresAt, extras: StringMap = null) => {
const refreshTimeBeforeTokensExpirationInSecond =
oidc.configuration.refresh_time_before_tokens_expiration_in_second;
if(oidc.timeoutId) {

Check failure on line 100 in packages/oidc-client/src/renewTokens.ts

View workflow job for this annotation

GitHub Actions / Run linters

Insert `·`

Check failure on line 100 in packages/oidc-client/src/renewTokens.ts

View workflow job for this annotation

GitHub Actions / Run linters

Insert `·`
timer.clearTimeout(oidc.timeoutId);
}
return timer.setTimeout(async () => {
const timeLeft = computeTimeLeft(refreshTimeBeforeTokensExpirationInSecond, expiresAt);
const timeInfo = { timeLeft };
Expand Down

0 comments on commit 782654d

Please sign in to comment.