awslabs / cognito-at-edge

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

Maintaining Query String #75

Open davidcanderson4 opened 1 year ago

davidcanderson4 commented 1 year 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.

SummerShoohaw commented 4 months ago

I'm facing exactly the same issue, any update?