diff --git a/features/admin.applications.v1/components/settings/sign-on-methods/components/sign-on-methods-core.tsx b/features/admin.applications.v1/components/settings/sign-on-methods/components/sign-on-methods-core.tsx index be81eaaf553..acc0083cb6a 100644 --- a/features/admin.applications.v1/components/settings/sign-on-methods/components/sign-on-methods-core.tsx +++ b/features/admin.applications.v1/components/settings/sign-on-methods/components/sign-on-methods-core.tsx @@ -899,6 +899,59 @@ export const SignOnMethodsCore: FunctionComponent { + if (isLoading || isAuthenticatorsFetchRequestLoading) { + return ( + + ); + } + + if (!readOnly && !loginFlow && isDefaultFlowConfiguration()) { + return ( + { + handleLoginFlowSelect( + type, + googleAuthenticators, + gitHubAuthenticators, + facebookAuthenticators, + microsoftAuthenticators, + appleAuthenticators + ); + } } + data-componentid={ `${componentId}-landing` } + /> + ); + } + + return ( + void, template: any) => { + setSelectedIDPTemplate(template); + setIDPCreateWizardTriggerOrigin("EXTERNAL"); + setIDPTemplateTypeToTrigger(type); + setShowMissingSocialAuthenticatorModal(false); + setShowIDPCreateWizard(true); + broadcastIDPCreateSuccessMessage = cb; + } } + onUpdate={ onUpdate } + onReset={ handleLoginFlowReset } + data-componentid={ componentId } + isLoading={ isAuthenticatorsFetchRequestLoading } + setIsLoading={ setIsAuthenticatorsFetchRequestLoading } + readOnly={ readOnly } + /> + ); + }; + return ( - { !(isLoading || isAuthenticatorsFetchRequestLoading) ? ( - !readOnly && !loginFlow && isDefaultFlowConfiguration() ? ( - { - handleLoginFlowSelect( - type, - googleAuthenticators, - gitHubAuthenticators, - facebookAuthenticators, - microsoftAuthenticators, - appleAuthenticators - ); - } } - data-componentid={ `${componentId}-landing` } - /> - ) : ( - void, template: any) => { - setSelectedIDPTemplate(template); - setIDPCreateWizardTriggerOrigin("EXTERNAL"); - setIDPTemplateTypeToTrigger(type); - setShowMissingSocialAuthenticatorModal(false); - setShowIDPCreateWizard(true); - broadcastIDPCreateSuccessMessage = cb; - } } - onUpdate={ onUpdate } - onReset={ handleLoginFlowReset } - data-componentid={ componentId } - isLoading={ isAuthenticatorsFetchRequestLoading } - setIsLoading={ setIsAuthenticatorsFetchRequestLoading } - readOnly={ readOnly } - /> - ) - ) : ( - - ) } - - ) } + legacyBuilder={ renderLegacyAuthenticationFlowBuilder() } onIDPCreateWizardTrigger={ (type: string, cb: () => void, template: any) => { setSelectedIDPTemplate(template); setIDPCreateWizardTriggerOrigin("EXTERNAL");