Closed DennisMC closed 2 years ago
Hi @DennisMC . Are you on TypeScript 4 or higher? This might be a duplicate of #26
I am using Typescript Version 4.5.4
Okay, so i realized my local Typescript was 4.5.4 but my Node.Js typescript version was not, I have now upgraded, however now i get a Syntax error: SyntaxError: Unexpected token '.'
I have had this error before but is was due to a typo, it seems not to be the case this time
This is where the syntax error originates: https://github.com/awslabs/aws-jwt-verify/blob/67a660278706d02746e30c1f469e87052e2b7262/src/jwt-rsa.ts#L708
That might be because of the optional chaining (?
), which is supported only by NodeJS v14.0.0 and up.
What's your NodeJS version?
It definitely is that then, my NodeJS version is 12
Okay then, hope you can go to Node14, it is the minimum version we support (also for other reasons, see also #23 )
I am getting a typescript error trying to verify a JWT using the provided example for cognito. here is my code:
The "verifier.verify(token)" is expecting 4 parameters but I am only providing it 1 as the example states, I am not sure how to proceed