Revokes a user's token from an Identity Provider (IdP). This is done by manually providing an IdP credential, and the token types for revocation.
An API key is required in the request in order to identify the Google Cloud project.
HTTP request
POST https://identitytoolkit.googleapis.com/v2/accounts:revokeToken
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"providerId": string,
"tokenType": enum ( |
Fields | |
---|---|
provider |
Required. The idp provider for the token. Currently only supports Apple Idp. The format should be "apple.com". |
token |
Required. The type of the token to be revoked. |
token |
Required. The token to be revoked. If an authorization_code is passed in, the API will first exchange the code for access token and then revoke the token exchanged. |
id |
Required. A valid Identity Platform ID token to link the account. If there was a successful token revocation request on the account and no tokens are generated after the revocation, the duplicate requests will be ignored and returned immediately. |
tenant |
The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
redirect |
The redirect URI provided in the initial authorization request made by the client to the IDP. The URI must use the HTTPS protocol, include a domain name, and can't contain an IP address or localhost. Required if tokenType is CODE. |
Response body
If successful, the response body is empty.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/identitytoolkit
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
TokenType
The type of the token to be revoked.
Enums | |
---|---|
TOKEN_TYPE_UNSPECIFIED |
Default value, do not use. |
REFRESH_TOKEN |
Token type is refreshToken. |
ACCESS_TOKEN |
Token type is accessToken. |
CODE |
Token type is authorization_code. |