CognitoIdentityProvider / Client / global_sign_out

global_sign_out#

CognitoIdentityProvider.Client.global_sign_out(**kwargs)#

Signs out a user from all devices. GlobalSignOut invalidates all identity, access and refresh tokens that Amazon Cognito has issued to a user. A user can still use a hosted UI cookie to retrieve new tokens for the duration of the 1-hour cookie validity period.

Your app isn’t aware that a user’s access token is revoked unless it attempts to authorize a user pools API request with an access token that contains the scope aws.cognito.signin.user.admin. Your app might otherwise accept access tokens until they expire.

Note

Amazon Cognito doesn’t evaluate Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you can’t use IAM credentials to authorize requests, and you can’t grant IAM permissions in policies. For more information about authorization models in Amazon Cognito, see Using the Amazon Cognito native and OIDC APIs.

See also: AWS API Documentation

Request Syntax

response = client.global_sign_out(
    AccessToken='string'
)
Parameters:

AccessToken (string) –

[REQUIRED]

A valid access token that Amazon Cognito issued to the user who you want to sign out.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

    The response to the request to sign out all devices.

Exceptions

  • CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException

  • CognitoIdentityProvider.Client.exceptions.InvalidParameterException

  • CognitoIdentityProvider.Client.exceptions.NotAuthorizedException

  • CognitoIdentityProvider.Client.exceptions.TooManyRequestsException

  • CognitoIdentityProvider.Client.exceptions.PasswordResetRequiredException

  • CognitoIdentityProvider.Client.exceptions.UserNotConfirmedException

  • CognitoIdentityProvider.Client.exceptions.InternalErrorException

  • CognitoIdentityProvider.Client.exceptions.ForbiddenException