Error invalid_client when hitting logout url

Hello everyone,

I have created a new App in Okta. The users can login on my website with Okta App. The issue is when a user is logout from my website then I want to redirect the user to login page of Okta and for this, I have to logout the app session from Okta.

In the documentation, it is mentioned to hit the logout url like below:
https://{issuerUrl}/oauth2/default/v1/logout. If I hit this url it always return me below error:

“errorCode”:“invalid_client”,“errorSummary”:“A client_id must be provided in the request.”

I have passed client_id in the request but I am still facing the same issue.

Can anyone help me ? because I have spend 2 hours on this and did not get any solution ?

You do not send the client_id in this request, you instead send a id_token_hint URL parameter, the value being the raw ID token issued to the user for this application. Don’t forget that this must be a redirect!

This is also discussed in our documentation for this endpoint, I definitely recommend reviewing our API docs if you’re unfamiliar with OIDC and how to interact with each endpoint.