Search code examples
amazon-web-servicessingle-sign-onamazon-cognitosamlaws-amplify

AWS Amplify federatedSignIn for multiple SAML providers


We need to support multiple identity providers on Cognito, therefore there will be multiple identity provider configuration will be set as SAML.

But I know that we need to provide the providerName as customProvider on AWS Amplify

const resp = await Auth.federatedSignIn({customProvider:'customSamlProviderName'})

how can we provide multiple providerName to Auth.federatedSignIn object? I just want to show only single login button for this.

Thanks!


Solution

  • As multiple identity provider name is not supported on

    Auth.federatedSignIn({customProvider: 'providerName'})
    

    we have decided to implement Home Realm Discovery, to fetch the relevant identity provider name by customer and dynamically set on Auth.federatedSignIn call.