From eb6de5cf01a7f651299965962f69a55107a1b730 Mon Sep 17 00:00:00 2001 From: vinu-deriv Date: Wed, 26 Feb 2025 19:29:42 +0400 Subject: [PATCH 1/2] remove a condition of requestOidcAuthentication --- src/javascript/_common/auth.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/javascript/_common/auth.js b/src/javascript/_common/auth.js index ed5022e8dca..3bce94d2fa1 100644 --- a/src/javascript/_common/auth.js +++ b/src/javascript/_common/auth.js @@ -155,8 +155,7 @@ export const requestSingleSignOn = async () => { isLoggedInCookie && !isCallbackPage && !isEndpointPage && - (!isClientAccountsPopulated || // Changed this condition since we need accounts to check tokens - hasMissingToken) && + (!isClientAccountsPopulated) && isAuthEnabled; if (shouldRequestSignOn) { From 00c9a47203249c12d9d15d34722ddce49b92f3cb Mon Sep 17 00:00:00 2001 From: vinu-deriv Date: Wed, 26 Feb 2025 19:33:09 +0400 Subject: [PATCH 2/2] remove a condition of requestOidcAuthentication --- src/javascript/_common/auth.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/javascript/_common/auth.js b/src/javascript/_common/auth.js index 3bce94d2fa1..bed50a24399 100644 --- a/src/javascript/_common/auth.js +++ b/src/javascript/_common/auth.js @@ -143,13 +143,6 @@ export const requestSingleSignOn = async () => { // if client.accounts in localStorage is empty - !isClientAccountsPopulated // and if feature flag for OIDC Phase 2 is enabled - isAuthEnabled // Check if any account or its linked account is missing a token - const hasMissingToken = Object.values(clientAccounts).some((account) => { - // Check if current account is missing token - if (!account?.token) { - return true; // No linked accounts and no token - } - return false; - }); const shouldRequestSignOn = isLoggedInCookie &&