Skip to main content
Ory is an open-source, enterprise-grade identity platform that provides API-first authentication, authorization, and user federation for modern applications. Configure Ory to federate to Auth0 B2B Connect as an to add to your existing Ory authentication stack.

How authentication works

  1. The user initiates login in your application.
  2. The application sends an authentication request to Ory.
  3. Ory identifies the user as an enterprise user and routes the request to Auth0 B2B Connect.
  4. Auth0 B2B Connect sends an authentication request to the user’s enterprise identity provider (for example, Okta or Microsoft Entra ID) using OpenID Connect (OIDC).
  5. The user authenticates with their corporate credentials at the enterprise identity provider.
  6. The enterprise identity provider returns an OIDC token to Auth0 B2B Connect.
  7. Auth0 B2B Connect performs domain discovery and returns the federation result to Ory.
  8. Ory issues a token to the application.
  9. The application validates the token, bootstraps its session, and grants the user access.

Prerequisites

To use Auth0 B2B Connect Enterprise with Ory, you need to:
Enterprise Home Realm Discovery (HRD) strictly requires Ory B2B Organizations. Native automated domain routing relies on linking verified email domains and upstream identity providers (SAML or OIDC) directly to an Organization for Ory to silently redirect users to their enterprise SSO during an Identifier-First login flow.

Configure Auth0 B2B Connect

To create a new B2B Connect integration:
  1. Navigate to Auth0 Dashboard > Applications > B2B Connect and select +Create Integration to start the B2B Connect wizard.
  2. Enter an Integration Name (for example, “Ory”).
  3. Under Integration Type, select Third-party Managed Authorization Server.
  4. Select Continue.
B2B Connect Enterprise Wizard in Auth0 Dashboard, integration name Ory
  1. Under Authentication Protocol, select OIDC (OpenID Connect).
  2. Select Continue.
  3. Enter the Application Callback URL. This is the Redirect URI for your Ory OIDC authentication provider, following this format:
    A. Replace YOUR_PROVIDER_ID with the identity provider alias you can find in your Ory console. If you don’t have this value yet, you can update the Application Callback URL later from the B2B Connect Settings tab at:
  4. Select Continue.
  5. On the confirmation screen, select Done to finish the wizard.

Copy credentials from the Settings tab

After the setup wizard completes, you need to select the integration you just created and copy values from the Settings tab for your Ory configuration. You need to copy the:
  • Client ID
  • Client Secret
  • Issuer URL
Copy Client ID, Client Secret, and Issuer URL from your integration settings

Configure Ory

Use the Ory Console to configure Auth0 B2B Connect as a Social Sign-In OIDC provider for your Ory Developer Tier project.

Add and configure an identity provider

To add Auth0 as an IdP, follow the instructions in your Ory Console:
  1. Select your workspace.
  2. Navigate to Authentication and select Social Sign-In (OIDC).
  3. Select Add new OpenID Connect provider.
Add the displayed Redirect URI in Auth0 Dashboard to your Auth0 B2B Connect application under Allowed Callback URLs in the Settings tab from Step 7.
  1. Set the Label to the name displayed to users on the sign-in screen.
  2. Enter the Client ID from the B2B Connect Settings tab.
  3. Enter the Client Secret from the B2B Connect Settings tab.
  4. Enter the Issuer URL from the B2B Connect Settings tab into the Tenant URL field.
  5. Select Save.

Verify the identity provider

  1. Using an application integrated with your existing Ory OAuth 2 Client, initiate a sign-in flow and verify that the Sign in with Auth0 button appears and successfully redirects you to Auth0.
  2. On the Auth0 login screen, enter your email address. Auth0 domain discovery triggers and redirects you to your upstream IdP (for example, Okta) to complete authentication.