diff --git a/src/login/LoginPage.jsx b/src/login/LoginPage.jsx index 52ab010182..7b0a08f3c7 100644 --- a/src/login/LoginPage.jsx +++ b/src/login/LoginPage.jsx @@ -166,6 +166,7 @@ class LoginPage extends React.Component { const isInstitutionAuthActive = !!secondaryProviders.length && !currentProvider; const isSocialAuthActive = !!providers.length && !currentProvider; const isEnterpriseLoginDisabled = getConfig().DISABLE_ENTERPRISE_LOGIN; + const isThirdPartyAuthActive = isSocialAuthActive || (isEnterpriseLoginDisabled && isInstitutionAuthActive); return ( <> @@ -183,7 +184,7 @@ class LoginPage extends React.Component { )} - {thirdPartyAuthApiStatus === PENDING_STATE ? ( + {thirdPartyAuthApiStatus === PENDING_STATE && isThirdPartyAuthActive ? ( ) : ( <> diff --git a/src/register/components/ThirdPartyAuth.jsx b/src/register/components/ThirdPartyAuth.jsx index 3a8682488c..0d447287d3 100644 --- a/src/register/components/ThirdPartyAuth.jsx +++ b/src/register/components/ThirdPartyAuth.jsx @@ -25,6 +25,7 @@ const ThirdPartyAuth = (props) => { const isInstitutionAuthActive = !!secondaryProviders.length && !currentProvider; const isSocialAuthActive = !!providers.length && !currentProvider; const isEnterpriseLoginDisabled = getConfig().DISABLE_ENTERPRISE_LOGIN; + const isThirdPartyAuthActive = isSocialAuthActive || (isEnterpriseLoginDisabled && isInstitutionAuthActive); return ( <> @@ -34,7 +35,7 @@ const ThirdPartyAuth = (props) => { )} - {thirdPartyAuthApiStatus === PENDING_STATE ? ( + {thirdPartyAuthApiStatus === PENDING_STATE && isThirdPartyAuthActive ? ( ) : ( <>