> ## Documentation Index
> Fetch the complete documentation index at: https://hoopdev-feat-new-runbook-parameters.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-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/idp/aws-cognito-1.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=6bd557cc11459ab336bb1f1b2d030997" 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-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/idp/aws-cognito-2.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=f6cfbfbc51f2e3af6207b6e377051ac5" 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-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/idp/aws-cognito-3.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=af9356e5520ba49b3c9947d77a33f67e" 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-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/idp/aws-cognito-4.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=4a94caff2a124ba243960d60116061dc" 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>
