Prerequisites

Steps

To connect your application to an OIDC , you must:
  1. Set up your app in the OpenID Connect Identity Provider
  2. Create an enterprise connection in Auth0
  3. Enable the enterprise connection for your Auth0 Application
  4. Test the connection

Set up your app in the OpenID Connect Identity Provider

To allow users to log in using an OIDC Identity Provider, you must register your application with the IdP. The process of doing this varies depending on the OIDC Identity Provider, so you will need to follow your IdP’s documentation to complete this task. Generally, you will want to make sure that at some point you enter your callback URL: https://{yourDomain}/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 a concatenation of your tenant name, your regional subdomain, and auth0.com, separated by the dot (.) symbol.For example, if your tenant name is exampleco-enterprises, and your tenant is in the US region, 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.However, if your tenant is in the US region and was created before June 2020, then your Auth0 domain name would be exampleco-enterprises.auth0.com and your Redirect URI would be https://exampleco-enterprises.auth0.com/login/callback.If you are using custom domains, your Redirect URI would be https://<YOUR CUSTOM DOMAIN>/login/callback.
During this process, your OIDC Identity Provider will generate a unique identifier for the registered API, usually called a or an Application ID. Make note of this value; you will need it later.

Create an enterprise connection in Auth0

Before you configure a OIDC Enterprise Connection in Auth0, ensure you have the Application (client) ID and the generated when you set up your app in the OIDC provider.

Create an enterprise connection using the Auth0 Dashboard

To be configurable through the Auth0 Dashboard, the OpenID Connect (OIDC) Identity Provider (IdP) needs to support OIDC Discovery. Otherwise, you can configure the connection using the Management API.
  1. Navigate to Auth0 Dashboard > Authentication > Enterprise, locate Open ID Connect, and click its +.
    Dashboard - Connections - Enterprise
  2. Enter details for your connection, and select Create:
FieldDescription
Connection nameLogical identifier for your connection; it must be unique for your tenant. Once set, this name can’t be changed.
OpenID Connect Discovery URLURL where Auth0 can find the well-known OpenID Connect discovery endpoint, usually available at the /.well-known/openid-configuration endpoint. 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. For more information, read Configure Applications with OIDC Discovery.
Communication ChannelSet 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.
Client IDThe identifier given to you by your provider. Unique identifier for your registered application. Enter the saved value of the Client ID for the app you registered with the OIDC Identity Provider. Each provider manages this step differently.
Client SecretAvailable if Back Channel is chosen earlier. The secret given to you by your provider and each provider manages this step differently.
Callback URLURL 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 loginIf selected, your tenant updates the relevant name, nickname, given_name, family_name, or picture root attributes each time a user logs in.
  1. Enter OIDC Connection Details
    In the Settings view, make additional configuration adjustments, if necessary.
FieldDescription
Connection NameThe name you provided when you created this connection. It can’t be changed.
Connection MetadataAutomatically generated when by the Well-Known Endpoint URL you provided in the previous screen, this can be overwritten by uploading a new metadata file.
Communication ChannelSet 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.
Client IDThe identifier given to you by your provider. Each provider manages this step differently.
Client SecretThe secret given to you by your provider. Each provider manages this step differently.
ScopesA 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.
Callback URLSome providers need this URL to complete your OIDC connection.
User MappingProvides templates to map specific user attributes to connection variables.
Connection ProfileTo understand how to change your connection profile, read Configure PKCE and Claim Mapping for OIDC Connections.
  1. In the Provisioning view, configure how user profiles get created and updated in Auth0.
FieldDescription
Sync user profile attributes at each loginWhen 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.
Sync user profiles using SCIMWhen enabled, Auth0 allows user profile data to be synced using SCIM. For more information, see Configure Inbound SCIM.
  1. In the Login Experience view, configure how users log in with this connection.
FieldDescription
Home Realm DiscoveryCompares a user’s email domain with the provided identity provider domains. For more information, read Configure Identifier First Authentication
Display connection buttonThis option displays the following choices to customize your application’s connection button.
Button display name (Optional)Text used to customize the login button for 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 Universal Login. When set, the Universal Login login button displays the image as a 20px by 20px square.
Optional fields are available with Universal Login only. Customers using Classic Login will not see the Add button, Button display name, or Button logo URL.
  1. Select Save Changes.

Create an enterprise connection using the Management API

These examples will show you the variety of ways you can create the connection using Auth0’s . You ca configure the connection by either providing a metadata URI or by setting the OIDC URLs explicitly. For more information, read Identity Providers.

Use front-channel with discovery endpoint

curl --request POST \
  --url 'https://{yourDomain}/api/v2/connections' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }'

Use back-channel with discovery endpoint

curl --request POST \
  --url 'https://{yourDomain}/api/v2/connections' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "discovery_url": "https://IDP_DOMAIN/.well-known/openid-configuration", "client_id" : "IDP_CLIENT_ID", "client_secret" : "IDP_CLIENT_SECRET", "scopes": "openid profile" } }'

Use back-channel specifying issuer settings

curl --request POST \
  --url 'https://{yourDomain}/api/v2/connections' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "back_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "client_secret" : "IDP_CLIENT_SECRET", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }'

Use front-channel specifying issuer settings

curl --request POST \
  --url 'https://{yourDomain}/api/v2/connections' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
  --data '{ "strategy": "oidc", "name": "CONNECTION_NAME", "options": { "type": "front_channel", "issuer": "https://IDP_DOMAIN", "authorization_endpoint": "https://IDP_DOMAIN/authorize", "token_endpoint": "https://IDP_DOMAIN/oauth/token", "client_id" : "IDP_CLIENT_ID",  "scopes": "openid profile" } }'

Configure PKCE and claims mapping

This Enterprise connection can support Proof Key for Code Exchange (PKCE), as well as attribute and token mapping. To learn more, review Configure PKCE and Claim Mapping for OIDC Connections.

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.

Manually configure Issuer metadata

If you click Show Issuer Details on the Issuer URL endpoint, you can see the data and adjust it if you need to.

Federate with Auth0

The Connect enterprise connection is useful when federating to another Auth0 tenant. 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.

Configure Global Token Revocation

This connection type supports a Global Token Revocation endpoint, which allows a compliant identity provider to revoke Auth0 user sessions, revoke , and trigger back-channel logout for applications using a secure back-channel. This feature can be used with Universal Logout in Okta Workforce Identity. For more information and configuration instructions, see Universal Logout.