From 4329c140510ec8e27476cef089b54ec6b1e3eb54 Mon Sep 17 00:00:00 2001 From: Sinan997 Date: Wed, 17 Apr 2024 15:12:37 +0300 Subject: [PATCH] update refresh token logic in initial time --- .../packages/oauth/src/lib/strategies/auth-flow-strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/oauth/src/lib/strategies/auth-flow-strategy.ts b/npm/ng-packs/packages/oauth/src/lib/strategies/auth-flow-strategy.ts index 1417fb7825..dd7958b023 100644 --- a/npm/ng-packs/packages/oauth/src/lib/strategies/auth-flow-strategy.ts +++ b/npm/ng-packs/packages/oauth/src/lib/strategies/auth-flow-strategy.ts @@ -83,7 +83,7 @@ export abstract class AuthFlowStrategy { .loadDiscoveryDocument() .then(() => { const isTokenExpire = isTokenExpired(this.oAuthService.getAccessTokenExpiration()); - if (!isTokenExpire || this.oAuthService.getRefreshToken()) { + if (isTokenExpire && this.oAuthService.getRefreshToken()) { return this.refreshToken(); }