awslabs / cognito-at-edge

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

fix: incorrect idToken regex with subdomains #44

Closed ckifer closed 1 year ago

ckifer commented 1 year ago

Issue # (if available):

43

Description of changes:

Proposed Regex solution \.[^.]+\.idToken=([^;]+) fails test here when there are . characters in the username. Need better regex before continuing.

Maybe there is a better way to parse idToken?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

borisfba commented 1 year ago

Hello Coltin,

Thank you for your contribution.

In future, we plan to URI encode cookies and avoid using Regex to parse it, because we have one more underlying issue with usernames containing illegal characters. Unfortunately, we cannot commit to a timeline for when it would be released.

ckifer commented 1 year ago

Closing since #46 was merged