aws-samples / cloudfront-authorization-at-edge

Protect downloads of your content hosted on CloudFront with Cognito authentication using cookies and Lambda@Edge
https://aws.amazon.com/blogs/networking-and-content-delivery/authorizationedge-using-cookies-protect-your-amazon-cloudfront-content-from-being-downloaded-by-unauthenticated-users/
MIT No Attribution
491 stars 160 forks source link

Nonce mismatch error for content #303

Closed StafShah closed 1 week ago

StafShah commented 1 week ago

Hello, I have been using this deployment for some of my static SPAs hosted on CF with no issue. However, I have just recently deployed an app that transacts with data via API Gateway, Lambda, and DynamoDB, which works as expected and has an additional app js script to run the api calls. It also uses the same user pool app client as the static SPA. However, when successfully logging in from the cognito UI, I am met with this error: image Additionally, the spa-auth-edge-nonce value is consistently holding the wrong value (prefixed with tXiY). I am unsure if this is a compatibility issue or that I have misconfigured something.

StafShah commented 1 week ago

Disregard, I had an issue on my end as I deployed two versions of the stack and was cross referencing some functions.