1 Answer
- Newest
- Most votes
- Most comments
0
Hello, in this document, CognitoJwtVerifier only does the following check, and does not check whether the token is revoked:
Validate tokens with aws-jwt-verify
In a Node.js app, AWS recommends the aws-jwt-verify library to validate the parameters in the token that your user passes to your app. With aws-jwt-verify, you can populate a CognitoJwtVerifier with the claim values that you want to verify for one or more user pools. Some of the values that it can check include the following.
- That access or ID tokens aren't malformed or expired, and have a valid signature.
- That access tokens came from the correct user pools and app clients.
- That access token claims contain the correct OAuth 2.0 scopes.
- That the keys that signed your access and ID tokens match a signing key kid from the JWKS URI of your user pools.The JWKS URI contains public information about the private key that signed your user's token. You can find the JWKS URI for your user pool at https://cognito-idp.<Region>.amazonaws.com/<userPoolId>/.well-known/jwks.json.
For more information and example code that you can use in a Node.js app or a AWS Lambda authorizer, see aws-jwt-verify on GitHub.
answered 2 years ago
Relevant content
asked 7 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 5 months ago
