> ## Documentation Index
> Fetch the complete documentation index at: https://hoopdev-docs-changelog-1-44-2.mintlify.site/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-docs-changelog-1-44-2/x0W8h7f0DkKzSFRI/images/idp/aws-cognito-1.png?fit=max&auto=format&n=x0W8h7f0DkKzSFRI&q=85&s=845f863570390da7cb43ba55d1f0a307" 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-docs-changelog-1-44-2/x0W8h7f0DkKzSFRI/images/idp/aws-cognito-2.png?fit=max&auto=format&n=x0W8h7f0DkKzSFRI&q=85&s=80b0b33b4bcb722833b95deb619fa958" 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-docs-changelog-1-44-2/x0W8h7f0DkKzSFRI/images/idp/aws-cognito-3.png?fit=max&auto=format&n=x0W8h7f0DkKzSFRI&q=85&s=2d42ccc4272a629bd0c28b717bfbede0" 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-docs-changelog-1-44-2/x0W8h7f0DkKzSFRI/images/idp/aws-cognito-4.png?fit=max&auto=format&n=x0W8h7f0DkKzSFRI&q=85&s=85cdcac86a93398abbedfc9077e53009" 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>
