<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Error "400 Bad Request" The "post_logout_redirect_uri" Parameter Must Be a Logout Redirect URI in the Client App Settings
API Access Management
Okta Classic Engine
Okta Identity Engine
Overview

During the logout, a 400 Bad Request error appears with the v1/logout URL. 
Error Message 

 
Applies To
Cause

This error is returned because the value of ${redirect_uri} used in the authorize request is not registered in the Open ID client in Okta as an allowed Logout redirect URIs.

Solution

In the following example of the v1/logout request:

https://example.okta.com/oauth2/v1/logout?id_token_hint=eyJraWQiOi&post_logout_redirect_uri=http://localhost:8080

Make sure that the redirect_uri http://localhost:8080 is registered as an allowed Logout redirect URI in OpenID Client for the application being used:

  1. From the Applications page of the Okta Admin Console, navigate to the OpenID application (there is also the possibility to navigate here directly by using the URL that appears in the error description).
  2. In the General tab, click Edit and add  http://localhost:8080 as a Logout redirect URI.
NOTE: The Logout redirect URIs provided here must be an exact, case-sensitive match (including trailing slashes) with the URI included in the logout request. If the post_logout_redirect_uri does not exactly match one of the Logout redirect URIs, this error will continue to be encountered.
  1. Click Save. The General settings should look like: 
Logout
Loading
Error "400 Bad Request" The "post_logout_redirect_uri" Parameter Must Be a Logout Redirect URI in the Client App Settings