Can't logout, error 400 Bad Request

Hi,

I have integrated Okta login but when I try to logout I have an error 400 Bad request. (I use PHP)

I have tried to change the authorizationServerId to “default” in the URL from :
https://dev-XXX.okta.com/oauth2/v1/logout?id_token_hint=’.$_SESSION[“access_token”]
to :
https://dev-XXX.okta.com/oauth2/default/v1/logout?id_token_hint=’.$_SESSION[“access_token”]

I have tried with a redirection to a specific url with the parameter “post_logout_redirect_uri” (the url of redirection being correctly registered in the application), but I still have the same error.
I have tried to add the parameter “state”, with the state recorded during the login, but no more success.

Do you have any ideas ?

Thank you.

Your code snippets there make it look like you may be providing an Access Token to the /logout endpoint, but you need to make sure that the value for the id_token_hint is an ID Token.

Do you still see an error if you send an ID token to this endpoint instead?

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.