awslabs / aws-jwt-verify

JS library for verifying JWTs signed by Amazon Cognito, and any OIDC-compatible IDP that signs JWTs with RS256, RS384, and RS512
Apache License 2.0
614 stars 43 forks source link

Typo in README code examples? #7

Closed brtrvn closed 2 years ago

brtrvn commented 2 years ago

Looks like there may be a typo in the README for the API Gateway Lambda Authorizer examples. We're pulling the JWT token string out of the request as accessToken but then passing jwt to the verifier.

const accessToken = event.authorizationToken ... const accessToken = event.headers["authorization"] .... payload = await jwtVerifier.verify(jwt);

https://github.com/awslabs/aws-jwt-verify#api-gateway-lambda-authorizer---rest

leelalagudu commented 2 years ago

Thank you for raising this issue, we will shortly fix this error in the readme file.