SAML User Pool IdP Authentication Flow
You can integrate SAML-based IdPs directly from your user pool.
-
The app starts the sign-up and sign-in process by directing your user to the UI hosted by AWS. A mobile app can use web view to show the pages hosted by AWS.
-
Typically your user pool determines the identity provider for your user from that user's email address.
Alternatively, if your app gathered information before directing the user to your user pool, it can provide that information to Amazon Cognito through a query parameter.
-
Your user is redirected to the identity provider.
-
The IdP authenticates the user if necessary. If the IdP recognizes that the user has an active session, the IdP skips the authentication to provide a single sign-in (SSO) experience.
-
The IdP POSTs the SAML assertion to the Amazon Cognito service.
-
After verifying the SAML assertion and collecting the user attributes (claims) from the assertion, Amazon Cognito internally creates or updates the user's profile in the userpool. Amazon Cognito returns OIDC tokens to the app for the now signed-in user.
The following diagram shows the authentication flow for this process:

Requests that are not completed within 5 minutes will be cancelled, redirected
to the login page, and then display a Something went wrong
error
message.
When a user authenticates, the user pool returns ID, access, and refresh tokens.
The ID token is a standard OIDC token for identity management, and the access token
is a standard OAuth 2.0