Question
I am using steps provided here in the Next.js project to verify JWT token. I always end up with this (Attached screenshot) error. It works once in a while and fails most of the case in local development. But when the app is deployed in AWS it just works fine without any error. I did increase timeout, wrote a custom methods to decode token and did test it using curl command everything just works fine except in node.js app. Please help if there is any fix or configuration i need to do in cognito dashboard.
Versions
Which version of aws-jwt-verify are you using? Latest
Are you using the library in Node.js or in the Web browser? Node.js
If Node.js, which version of Node.js are you using? (Should be at least 18) 22.16
If Web browser, which web browser and which version of it are you using? None
If using TypeScript, which version of TypeScript are you using? (Should be at least 4) 5