diff --git a/src/javascript/_common/auth.js b/src/javascript/_common/auth.js index ed5022e8dca..bed50a24399 100644 --- a/src/javascript/_common/auth.js +++ b/src/javascript/_common/auth.js @@ -143,20 +143,12 @@ 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 && !isCallbackPage && !isEndpointPage && - (!isClientAccountsPopulated || // Changed this condition since we need accounts to check tokens - hasMissingToken) && + (!isClientAccountsPopulated) && isAuthEnabled; if (shouldRequestSignOn) {