<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

Configure OpenID Connect Sign-In Redirect URIs in Okta

API Access Management
Okta Classic Engine
Okta Identity Engine

Overview

Configuring OpenID Connect (OIDC) Sign-in Redirect URIs in Okta securely routes users after authentication. The value of the redirect_uri parameter in the /authorize request must exactly match one of the allowed Sign-in Redirect URIs in the application settings to prevent authentication failures. A mismatch between the requested URI and the configured URI generates the following error:

 

Okta Error "400 Bad Request" - "The redirect_uri Parameter Must Be a Login Redirect URI in the Client App Settings"

 

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • OpenID Connect (OIDC)
  • Sign-in Redirect URI
  • Authorize (GET /authorize) request of Implicit Flow and Authorization Code Flow

Solution

What is the purpose of the redirect URI?

The application initiates the flow by building the /authorize request. This request includes the redirect_uri parameter, which tells Okta exactly where to securely return the user after successful authentication.
Review the following example of an /authorize request that uses https://example.com as the redirect URI.

 
https://<okta_domain>/oauth2/v1/authorize?
client_id=0oabucvyc38HLL1ef0h7&
response_type=code&scope=openid&
redirect_uri=https%3A%2F%2Fexample.com&
state=state-296bc9a0-a2a2-4a57-be1a-d0e2fd9bb601

Configure the sign-in redirect URIs in the Okta Admin Console.

Navigate to the application settings in the Okta Admin Console, locate the login configuration, and add the required URI to the sign-in redirect URIs field as detailed in either the video demonstration or the written instructions.

 

  1. Navigate to Applications > Applications.
  2. Select the application and navigate to the General tab.
  3. Locate the LOGIN section.
  4. Add the URI to the Sign-in redirect URIs field.
    Login

What are common mistakes with redirect URIs?

The redirect_uri that the application sends to Okta as part of the /authorize request must exactly match one of the Sign-in redirect URIs that the application allows. Note that "Sign-out redirect URIs" are configured separately and serve a different purpose from "Sign-in redirect URIs."

 

If Okta generates a “400 Bad Request” - The redirect_uri Parameter Must Be a Login Redirect URI in the Client App Settings error during the /authorize request, verify that the redirect_uri being sent by the application matches what is configured for the application based on the following criteria:

  • HTTP vs HTTPS
  • Subdomain/domain
  • Trailing slash
  • Case sensitivity
  • Port number
  • Dynamic query parameters
  • Request path
  • URL encoding

 

Related Resources

Loading
Okta Support - Configure OpenID Connect Sign-In Redirect URIs in Okta