awslabs / cognito-at-edge

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

Unhandled error if cookies disabled #52

Closed foxbox-doug closed 1 year ago

foxbox-doug commented 1 year ago

What happened:

User attempted to log in with ad block. Error message in log is as follows:

User isn't authenticated: TypeError: Cannot read properties of undefined (reading 'flatMap')

What did you expect to have happen:

Error message in log indicating that no cookies were found rather than null reference exception.

How to reproduce this (as precisely and succinctly as possible):

Attempt to access protected content using an ad blocker that prevents cookies from being sent.

Anything else you think we should know?

N/A

Environment:

foxbox-doug commented 1 year ago

Looks like the actual issue is a timeout. I will extend the timeout to see if that resolves the issue.

foxbox-doug commented 1 year ago

Underlying issue was timeout. Leaving this issue open until I can open a PR to resolve the null reference exception.

jeandek commented 1 year ago

Fixed by #53 .