@auth0/nextjs-auth0 - v4.30.0
    Preparing search index...

    Function isFederatedDomain

    • Checks whether an email domain is managed for enterprise SSO on an Auth0 tenant.

      This is a routing hint, not a security control. Always validate the org_id claim on the resulting ID token regardless of what this returns.

      Server-side only. Calling this from the browser would expose the Auth0 domain and allow clients to enumerate your customers' domains.

      Parameters

      • auth0Domain: string

        Your Auth0 tenant domain, e.g. your-tenant.auth0.com.

      • emailDomain: string

        The domain part of the user's email, e.g. acmecorp.com. Case-insensitive.

      • Optionaloptions: IsFederatedDomainOptions

        Optional customFetch and timeoutMs overrides.

      Returns Promise<boolean>

      true only when Auth0 has an enterprise connection or organization domain-discovery record for the domain. Returns false on any error, so a WebFinger outage degrades to your existing login flow rather than blocking it.

      const emailDomain = email.split("@")[1];
      if (await isFederatedDomain(process.env.AUTH0_DOMAIN!, emailDomain)) {
      // route through Auth0 SSO
      } else {
      // route through your existing login
      }