Does Cognito's RevokeToken API call invalidate Access Tokens and/or Id Tokens and/or Refresh Tokens?

0

The documentation for Amazon Cognito RevokeToken says:

Revokes all of the access tokens generated by the specified refresh token. After the token is revoked, you can't use the revoked token to access Amazon Cognito authenticated APIs. (emphasis added)

The documentation also says:

{
   "ClientId": "string",
   "ClientSecret": "string",
   "Token": "string"
}
...

The refresh token that you want to revoke.

Does this mean that the Refresh Token is revoked? Or that the Access Tokens and/or ID Tokens generated by a specific Refresh Token are revoked?

1개 답변
1

Suppose an user has logged in at 1 AM and Cognito has returned access, ID and refresh tokens after the user sign-in. If you call the RevokeToken API with that refresh token, then the initially issued access and ID tokens, the refresh token, and all access and ID tokens which were issued using that refresh token will be revoked.

Note: Only Cognito service is aware of the token revocation when you revoke token using RevokeToken API. However, your resource server will treat the token as valid until the token's expiry time breach. You may call GetUser API of Cognito to check whether a token is revoked or not. However, please consider the limit per second on number of GetUser API [1].

[1] https://docs.amazonaws.cn/en_us/cognito/latest/developerguide/limits.html#:~:text=AdminGetUser-,GetUser,-Operations%20that%20retrieve

AWS
지원 엔지니어
Tarit_G
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인