Closed AlejandroMAL closed 2 years ago
Hi @AlejandroMAL
Seems to be a webpack related issue, it struggles with the optional chaining operator (the ?
), which has been around now for quite some time in JS.
Suggest to update webpack.
A quick google revealed this thread with a comment that might work for you, if you don't want to update webpack: https://github.com/webpack/webpack/issues/10227#issuecomment-950242155
Side note: you don't need to provide the jwksUri
when creating the CognitoJwtVerifier
because it will understand that uri itself, based on your User Pool ID, exactly as you have coded it yourself. Saves you 1 line of code 😄
Thank you so much! That solved the issue.
Edit: Fixed upgrading Webpackl if that might help anyone else.
@ottokruse I'm using latest version of webpack, but I still have these errors
Please open a new issue @hero9 and provide the requested details for your specific case.
Question How can we help you?
I am using Nodejs 16 with TS, each time I try to verify the token throws the following error:
This is my code:
I wonder if this is an error on the library or if it is related to the code implementation, hopefully, you can help. Thanks.
Versions Which version of
aws-jwt-verify
are you using? 2.1.1Which version of Node.js are you using? (Should be at least 14) 16.13.1
If using TypeScript, which version of TypeScript are you using? (Should be at least 4) 4.5.4