awslabs / cognito-at-edge

Serverless authentication solution to protect your website or Amplify application
Apache License 2.0
168 stars 54 forks source link

Maintaining Query String #75

Open davidcanderson4 opened 10 months ago

davidcanderson4 commented 10 months ago

I have configured cognito-at-edge to work with my Cognito user pool and Lamba@edge authorizer. I am having trouble with a query string being lost when the refresh token is used to generate a new id/access token.

Works:

  1. Go to www.acme.com/mypage.html?name=bob
  2. Lambda@edge calls cognito-at-edge
  3. Either user has to enter Cognito credentials or the user already had a valid id/access token
  4. User is direct to www.acme.com/mypage.html?name=bob

Problem:

  1. Go to www.acme.com/mypage.html?name=bob
  2. Lambda@edge calls cognito-at-edge
  3. User has an expired ACCESS token but a valid REFRESH token
  4. Cognito-at-edge gets new access token
  5. User is directed to www.acme.com/mypage.html (the query string "?name=bob" is not present)

Wondering if the issue of the dropped query string is an issue with my code, cognito-at-edge, cognito, or otherwise.

Thank you for your assistance in advance.