<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
How to Configure Custom Error Pages in Okta for the "illegal_redirect_uri_enhanced" Error
API Access Management
Okta Identity Engine
Overview

User encounters the below 400 Bad Request error page when logging into OIDC application (Okta hosted widget or self-hosted widget) due to not registering the value of ${redirect_uri} that used in authorize request in the Open ID client in Okta, as an allowed Sign-in redirect URIs. Refer to Error "400 Bad Request" - The redirect_uri Parameter Must Be a Login Redirect URI in the Client App Settings for more information. This is the default Okta error page. If a customized error page is needed, a custom error page can be configured in the settings.

Error Message 

 
Applies To
  • Okta hosted sign-in widget
  • Okta self-hosted sign-in Widget
  • Sign-in Widget
  • Authorization Code Flow
  • Implicit Flow
  • Okta Identity Engine (OIE)
Cause

Default Okta error page is shown as the custom error page is not configured in Okta. 

Solution
  1. Browse to Security > Identity Providers.
  2. Click the settings button next to Add Identity Provider.
  3. Select the radio button to Use a custom error page and enter the URL.

Given this setting, Okta will not display the 400 error page to end users but will redirect them to the configured URL.
Identity Providers Settings 

 
Loading
How to Configure Custom Error Pages in Okta for the "illegal_redirect_uri_enhanced" Error