AWS Cognito - Pre-clicking an OAuth provider in hosted UI

Viewed 39

We have a provider (Xero) who insist that when we use their site to authenticate a user we must use their OAuth provider process directly, but we're using Cognito to allow users a choice of auth identities.

To get around this restriction we want to direct the person straight to Xero when they follow a particular link, bypassing the normal Cognito UI and effectively clicking the "Login using Xero" button URI that Cognito provides directly to the user so that the initial landing page is directed to Xero but the returnURL goes to Cognito to generate or validate the user and give us Cognito's claims.

Is there no API that can be called to request the URI's for different providers? Obviously I could cut and paste the Xero endpoint, but that would be using a hard-coded nonce and state.

1 Answers

You can pre-select the identity provider using the identity_provider parameter (documented here) when redirecting to the hosted UI.

Related