This article explains the purpose of the id_token_hint parameter in the /logout API endpoint and its role in the logout process.
- OpenID Connect (OIDC)
- Single Logout (SLO)
/logoutAPI Endpoint
What is an id_token_hint?
The id_token_hint parameter is a required parameter used in requests to the /logout endpoint in OIDC flows. Its purpose is to provide a hint to the Okta Authorization Server about the end-user's session that is being requested to be logged out.
id_token_hint is a valid JWT that is issued by the Okta Authorization Server when using any of the OIDC flows (this can be either the Org Authorization Server or a Custom Authorization Server) as part of openid scope. The id_token_hint requires the original ID Token (issued to the client application after the authentication process) to be passed as a raw JSON Web Token (JWT) string.
A raw JWT string is like a sequence of encoded characters separated by periods. For example, below is a sample ID token issued by Okta after a user successfully logs into their application if openid scope is requested:
eyJraWQiOiJ5dnkwVUNvZGlSWVBCVzBnZTdVRy1GdFNhbUZla3BoVjcyRUJCQlJHQi1vIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwMUxbmR0bG5sbXZxYWJ3TzFkOCIsIm5hbWUiOiJSYW5nYSBQcmFrYXNoIFMiLCJsb2NhbGUiOJJTiIsImVtYWlsIjoicmFuZ2EucHJha2FzaEBva3RhLmNvbSIsIZlciI6MSwiaXNzIjoiaHR0cHM6Ly9va3RhLm9rdGEuY29tIiwiYXVkIjoib2t0YS4yYj5NTljOC1iYY29tIiwiZ2l2ZW5fbmFtZSI6IlJhbmdhIFByYWthc2giLCJmYW1pbHlfbmFtZSI6MiLCJ6b25laW5mbyI6IkFzaWEvQ9sb21ibyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiYXV0aF90aW1lIjoxNzQzNzU0MTExLCJhdF9oYXNoIjoiUjNWb2JfaVhmSU1kcF93aDE4cDNyUSJ9.EJbuGeOTmGiloswI7_hxTkUnUhHAG5614VYVYSAwiiAZkNlFHAf_YagE3SySpuE2AZyKaaFqDvIJ2KBgf5ZEpxhiOMCJEGhAQ0nAUZtVb1ROLLrRhzClpm3TQiRbijcJZEJvpzlyXzDngY4AIwL0B8GYy4GqiPsdEa20YHYqMyNdMvdMlhxxumlTSFDn28kL4zW7e0Hwqloa8mQK8p1LkCYh3LCIi8aDEGX-
