> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.hoop.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Cognito

## Requirements

* An account in AWS
* `API_URL` is the public DNS name of the hoop gateway instance

Contact the administrator of the hoop gateway instance to retrieve the `API_URL` address.

<Steps titleSize="h3">
  <Step title="Create a User Pool">
    Go to AWS Management Panel > AWS Cognito > User Pools > Create User Pool

    * Select the checkbox User Name and Email and click Next
    * In Multi Factor Authentication, change it No MFA and click Next
    * In Requirement Attributes select: `name` and click Next
    * On Message Delivery configure it and click Next
  </Step>

  <Step title="Integrate Your App Section">
    * Select a name for the user pool. e.g.: hoopgateway
    * Select the checkbox Use the Cognito Hosted UI
    * Configure the Cognito domain

    <img src="https://mintcdn.com/hoopdev/lXR_b8zeId-35Lup/images/idp/aws-cognito-1.png?fit=max&auto=format&n=lXR_b8zeId-35Lup&q=85&s=96aad43c0c50a3bfecc4a858a674944e" width="2000" height="381" data-path="images/idp/aws-cognito-1.png" />

    * In Initial App Client, select Public Client and add an App client name
    * Select the option Generate Client Secret
    * Add the URL of the callback to `{API_URL}/api/callback`

    <img src="https://mintcdn.com/hoopdev/lXR_b8zeId-35Lup/images/idp/aws-cognito-2.png?fit=max&auto=format&n=lXR_b8zeId-35Lup&q=85&s=32c73828d9b3de9bbf37351efc83663c" width="2000" height="2153" data-path="images/idp/aws-cognito-2.png" />

    * In Advanced app client settings, select the checkbox ALLOW\_USER\_PASSWORD\_AUTH
    * Configure the scopes Email, OpenID and Profile

    <img src="https://mintcdn.com/hoopdev/lXR_b8zeId-35Lup/images/idp/aws-cognito-3.png?fit=max&auto=format&n=lXR_b8zeId-35Lup&q=85&s=4d1a70a6d440998e6f2bdab96cad835e" width="2000" height="430" data-path="images/idp/aws-cognito-3.png" />

    * Leave all the rest of options as default, click in Next and create the user pool
  </Step>

  <Step title="Collect the Credentials">
    * Go to the created user pool
    * Select the tab App Integration > Click on `hoopauth`
    * Copy the Client ID and Client Secret

    <img src="https://mintcdn.com/hoopdev/lXR_b8zeId-35Lup/images/idp/aws-cognito-4.png?fit=max&auto=format&n=lXR_b8zeId-35Lup&q=85&s=d3729e7c80349f2d03c0d54465ce368d" width="672" height="446" data-path="images/idp/aws-cognito-4.png" />
  </Step>

  <Step title="Collect Issuer Information">
    The URL is composed by the id of the user pool: `https://cognito-idp.<aws-region>.amazonaws.com/<user-pool-id>`
  </Step>
</Steps>
