From 931f0a5fbada26817f053e113c2871a8d0b88525 Mon Sep 17 00:00:00 2001 From: Urmi Kataria Date: Tue, 12 Mar 2024 15:08:27 -0700 Subject: [PATCH] fix --- .../src/app/services/authentication/authentication.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portal-frontend/src/app/services/authentication/authentication.service.ts b/portal-frontend/src/app/services/authentication/authentication.service.ts index a28edb1dac..8b7c9dc393 100644 --- a/portal-frontend/src/app/services/authentication/authentication.service.ts +++ b/portal-frontend/src/app/services/authentication/authentication.service.ts @@ -80,7 +80,9 @@ export class AuthenticationService { async refreshTokens(redirect = true) { if (this.refreshToken) { if (this.refreshExpires && this.refreshExpires < Date.now()) { - await this.router.navigateByUrl('/login'); + if (redirect) { + await this.router.navigateByUrl('/login'); + } return; } const newTokens = await this.getNewTokens(this.refreshToken);