cognito-auth-example
cognito-auth-example copied to clipboard
Example app to show how Cognito tokens work
Deploy
Requirements: Terraform set up with an AWS account, npm
terraform initterraform apply
Usage
- go to the URL
- sign up with a user (for example
test/Password1], to conform to the password policy) - you'll see the Cognito user id and that you have tokens
- use "Refresh token" to generate a new set of access keys
- you'll see the status of each token
userInfo: result for the USERINFO endpointapi access_token: API check for the access tokenapi id_token: API check for the id token
- use "Revoke token" to send a revocation to the REVOCATION endpoint
Cleanup
terraform destroy