Cognito login demo

Login with Amazon Cognito

Log in with Cognito

What happens when you log in

  1. This app sends your browser to the Cognito login page. It sends a random state value and a PKCE challenge.
  2. You type your password on the Cognito page. This app never sees your password.
  3. Cognito sends your browser back to /callback with a one-time code.
  4. This app checks state, then exchanges the code for tokens in a server-to-server call.
  5. This app verifies the ID token signature with the public keys of the user pool.
  6. If you are in the aws-users group, this app sends the ID token to the identity pool and gets temporary AWS credentials for the role of that group.
  7. This app creates its own session. Your browser holds only a session cookie.