title: AWS AUTHORIZATION endpoint redirecting to LOGIN endpoint
body: <p>In AWS, I have a User Pool.  </p>
  
  <ul>
  <li><p>That user pool has a user.</p></li>
  <li><p>That user pool has an App client, with App Client Id of MY-CLIENT-ID.</p></li>
  <li><p>That App client is enabled as an identity provider for the cognito user pool, has a callback url of <a href="https://MY_APP/redirect_uri" rel="noreferrer">https://MY_APP/redirect_uri</a>, has only "Authorization code grant" checked under "Allowed OAuth Flows" and "email" and "openid" checked under "Allowed OAuth Scopes".</p></li>
  <li><p>That user pool has a domain name of MY-DOMAIN.</p></li>
  </ul>
  
  <p>When I navigate to</p>
  
  <pre><code>https://MY-DOMAIN.auth.us-east-1.amazoncognito.com/login?
  response_type=code&amp;
  client_id=MY-CLIENT-ID&amp;
  redirect_uri=https://MY_APP/redirect_uri
  </code></pre>
  
  <p>I am redirected to the default Cognito login screen, and can successfully authenticate with my User pool user.  After authenticating, I am redirected to</p>
  
  <pre><code>https://MY_APP/redirect_uri?code=AUTHORIZATION_CODE
  </code></pre>
  
  <p>However, when I navigate (either via browser or curl) to</p>
  
  <pre><code>https://MY-DOMAIN.auth.us-east-1.amazoncognito.com/oauth2/authorize?
  response_type=code&amp;
  client_id=MY-CLIENT-ID&amp;
  redirect_uri=https://MY_APP/redirect_uri
  </code></pre>
  
  <p>where I expect</p>
  
  <pre><code>HTTP/1.1 302 Found
  Location: https://MY_APP/redirect_uri?code=AUTHORIZATION_CODE
  </code></pre>
  
  <p>instead, I'm receiving</p>
  
  <pre><code>HTTP/1.1 302 Found
  Location: https://MY-DOMAIN.auth.us-east-1.amazoncognito.com/login?
  response_type=code&amp;
  client_id=MY-CLIENT-ID&amp;
  redirect_uri=https://MY_APP/redirect_uri
  </code></pre>
  
  <p>which (obviously) redirects me to the login page.</p>
  
  <p>I'm certain I've overlooking something obvious, but cannot figure out what it is.</p>
  
  <p>Ref: <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html" rel="noreferrer">https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html</a></p>