Connect to Okta as an OpenID Connect Identity Provider

If you are using the Lock login widget with an OpenID Connect (OIDC) connection, you must use Lock version 11.16 or higher.

Prerequisites

Steps

To connect your application to an OIDC Identity Provider, you must:

  1. Register your app with Okta.
  2. Create an enterprise connection in Auth0.
  3. Enable the enterprise connection for your Auth0 Application.
  4. Test the connection.

Register your app with Okta

To allow users to log in using Okta, you'll need to register your application. See Register your app (Okta Documentation) for full instructions.

During registration you'll be prompted for Sign-in redirect URIs. Add your callback URL as a sign-in redirect URI:

https://YOUR_DOMAIN/login/callback

Find your Auth0 domain name for redirects

If your Auth0 domain name is not shown above and you are not using our custom domains feature, your domain name is your tenant name, your regional subdomain (unless your tenant is in the US region and was created before June 2020), plus.auth0.com. For example, if your tenant name were exampleco-enterprises, your Auth0 domain name would be exampleco-enterprises.us.auth0.com and your redirect URI would be https://exampleco-enterprises.us.auth0.com/login/callback. (If your tenant is in the US and was created before June 2020, then your domain name would be https://exampleco-enterprises.auth0.com.)

If you are using custom domains, your redirect URI will have the following format: https://<YOUR CUSTOM DOMAIN>/login/callback.

Once you finish registering your application with Okta, save the Client ID and Client secret to use in the next step.

Create an enterprise connection in Auth0

Next, you will need to create and configure a OIDC Enterprise Connection in Auth0. Make sure you have the Application (client) ID and the Client secret generated when you set up your app in the OIDC provider.

Create an enterprise connection using the Dashboard

  1. Navigate to Auth0 Dashboard > Authentication > Enterprise, locate Open ID Connect, and click its +.

Create Connection Type

  1. Enter details for your connection, and select Create:
Field Description
Connection name Logical identifier for your connection; it must be unique for your tenant. Once set, this name can't be changed.
Issuer URL URL where Auth0 can find the OpenID Provider Configuration Document. For Okta this should be either of the following:
  • https://<YOUR_OKTA_DOMAIN>/.well-known/openid-configuration
  • https://<YOUR_OKTA_DOMAIN>/oauth2/<AUTH_SERVER_ID>/.well-known/

You can enter the base URL or the full URL. You will see a green checkmark if it can be found at that location, a red mark if it cannot be found, or an error message if the file is found but the required information is not present in the configuration file. | | Client ID | Unique identifier for your registered Okta application. Enter the saved value of the Client ID for the app you registered with the OIDC Identity Provider. | | Callback URL | URL to which Auth0 redirects users after they authenticate. Ensure that this value is configured for the app you registered with the OIDC Identity Provider. | Sync user profile attributes at each login | When enabled, Auth0 automatically syncs user profile data with each user login, thereby ensuring that changes made in the connection source are automatically updated in Auth0. |

Find your Auth0 domain name for redirects

If your Auth0 domain name is not shown above and you are not using our custom domains feature, your domain name is your tenant name, your regional subdomain (unless your tenant is in the US region and was created before June 2020), plus.auth0.com. For example, if your tenant name were exampleco-enterprises, your Auth0 domain name would be exampleco-enterprises.us.auth0.com and your redirect URI would be https://exampleco-enterprises.us.auth0.com/login/callback. (If your tenant is in the US and was created before June 2020, then your domain name would be https://exampleco-enterprises.auth0.com.)

If you are using custom domains, your redirect URI will have the following format: https://<YOUR CUSTOM DOMAIN>/login/callback.

Enter OIDC Connection Details

  1. In the Settings view, make additional configuration adjustments, if necessary.
Field Description
Issuer URL Click Show Issuer Details to view the Issuer URL Advanced Settings and make adjustments.
Type Set to Front Channel or Back Channel. Front Channel uses the OIDC protocol with response_mode=form_post and response_type=id_token. Back Channel uses response_type=code.
Scopes A comma-separated list of Auth0 scopes to request when connecting to the Identify Provider. This will affect the data stored in the user profile. You are required to include at least the openid scope. Note that the connection does not call /userinfo endpoint and expects the user claims to be present in the id_token.
  1. In the Login Experience view, configure how users log in with this connection.
Field Description
Identity Provider domains A comma-separated list of the domains that can be authenticated in the Identify Provider. This is only applicable when using Identifier First authentication in the Universal Login Experience.
Add button (Optional) Display a button for this connection in the login page.
Button display name (Optional) Text used to customize the login button for new Universal Login. When set the button reads: "Continue with {Button display name}".
Button logo URL (Optional) URL of image used to customize the login button for new Universal Login. When set, the Universal Login login button displays the image as a 20px by 20px square.

Optional fields are available with the New Login Experience only. Customers using the Classic experience will not see the Add button, Button display name, or Button logo URL.

  1. Select Save Changes.

For instructions on creating an enterprise connection using the Management API, see Connect to OpenID Connect Identity Provider

Enable the enterprise connection for your Auth0 application

To use your new enterprise connection, you must first enable the connection for your Auth0 Applications.

Test the connection

Now you're ready to test your connection.

Federate with Auth0

The OpenID Connect enterprise connection is extremely useful when federating to another Auth0 tenant. Just enter your Auth0 tenant URL (for example, https://<tenant>.us.auth0.com) in the Issuer field, and enter the Client ID for any application in the tenant to which you want to federate in the Client ID field.

New tenants will have us as part of the URL. Tenants created before the regional domain addition will continue to work. For example, https://{YOUR ACCOUNT}.auth0.com.