- Newest
- Most votes
- Most comments
Hello,
In regards to Revoke Token API output, as noted on CLI doc [1] there in no output in response for this call. Basically for response element, if the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. [2]
The current errors account for WAF block, internal error, unauthorized access, invalid parameter, throttling, unsupported operation or token type. [3]
I also ran a quick CLI command run check for the same and found the consistent behavior as per docs reference -
- Logged in as the user to get the tokens.
$ aws cognito-idp initiate-auth --client-id 2XXXXXXXXXXXXXXXXr --auth-flow USER_PASSWORD_AUTH --auth-parameters "USERNAME=test1002,PASSWORD=XXXXXXXXX"
{
"ChallengeParameters": {},
"AuthenticationResult": {
"AccessToken": "eyJ....Rhg",
"ExpiresIn": 3600,
"TokenType": "Bearer",
"RefreshToken": "eyJ...vhg",
"IdToken": "ey...cmg"
}
}
- Used the above refresh token with Revoke token API.
$ aws cognito-idp revoke-token --client-id 2XXXXXXXXXXXXXXXXr --token eyJ...vhg
No output here.
- Called the above API again and noticed the same behavior.
$ aws cognito-idp revoke-token --client-id 2XXXXXXXXXXXXXXXXr --token eyJ...vhg
No output here.
Additionally, I do understand that you expected it to throw an error. Hence, please feel free to reach out to the Cognito dev team (https://github.com/aws-amplify/amplify-js/issues, and to confirm and rmove any confusion, the previous Cognito repo - https://github.com/amazon-archives/amazon-cognito-identity-js has been merged into the mentioned amplify js repo) to report this as a feature request or you can also create a support ticket with our Premium Support team directly, and we can help in creation of the error feature request on your behalf to the service team for the same.
References:
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 23 days ago
- AWS OFFICIALUpdated 2 years ago