Skip to main content
Preview of the SSO Provider Table component

Setup Requirements

Auth0 Configuration Required - Ensure your tenant is configured with the My Organization API. View setup guide →

Installation

npm install @auth0/universal-components-react
Running the shadcn command also installs the @auth0/universal-components-core dependency for shared utilities and Auth0 integration.

Quick Start

import { SsoProviderTable } from '@auth0/universal-components-react/spa';

export function ProvidersPage() {
  const navigate = useNavigate();

return (

<SsoProviderTable
createAction={{
        onAfter: () => navigate("/providers/create"),
      }}
editAction={{
        onAfter: (provider) => navigate(`/providers/${provider.id}`),
      }}
/>
);
}

While this example uses a React SPA, the prop configurations (schema, customMessages, styling, etc.) apply equally to Next.js and shadcn setups.
import React from "react";
import { SsoProviderTable } from "@auth0/universal-components-react/spa";
import { Auth0Provider } from "@auth0/auth0-react";
import { Auth0ComponentProvider } from "@auth0/universal-components-react/spa";
import { useNavigate } from "react-router-dom";
import { analytics } from "./lib/analytics";

function ProvidersManagementPage() {
  const navigate = useNavigate();

  return (
    <div className="max-w-6xl mx-auto p-6">
      <SsoProviderTable
        createAction={{
          onAfter: () => {
            analytics.track("Create Provider Started");
            navigate("/providers/create");
          },
        }}
        editAction={{
          onAfter: (provider) => {
            analytics.track("Provider Selected", { name: provider.name });
            navigate(`/providers/${provider.id}`);
          },
        }}
        deleteAction={{
          onBefore: (provider) => {
            return confirm(
              `Delete "${provider.display_name}"? This is permanent.`,
            );
          },
          onAfter: (provider) => {
            analytics.track("Provider Deleted", { name: provider.name });
          },
        }}
        enableProviderAction={{
          onAfter: (provider) => {
            analytics.track(
              provider.is_enabled ? "Provider Enabled" : "Provider Disabled",
              {
                name: provider.name,
              },
            );
          },
        }}
        customMessages={{
          header: {
            title: "SSO Providers",
            description: "Manage identity providers for your organization",
            create_button_text: "Add New Provider",
          },
          table: {
            empty_message:
              "No providers configured yet. Add one to enable SSO.",
          },
        }}
        styling={{
          variables: {
            light: { "--color-primary": "#0066cc" },
          },
          classes: {
            "SsoProviderTable-header": "shadow-lg rounded-xl",
          },
        }}
      />
    </div>
  );
}

export default function App() {
  return (
    <Auth0Provider
      domain="your-domain.auth0.com"
      clientId="your-client-id"
      authorizationParams={{
        redirect_uri: window.location.origin,
      }}
    >
      <Auth0ComponentProvider>
        <ProvidersManagementPage />
      </Auth0ComponentProvider>
    </Auth0Provider>
  );
}

Props

Core Props

Core props are fundamental to the component’s operation. SsoProviderTable requires both navigation actions to handle the typical provider management workflow.
PropTypeDescription
createActionComponentAction<void>Required. Navigate to create provider. Details
editActionComponentAction<IdentityProvider>Required. Navigate to edit provider. Details

createAction

Type: ComponentAction<void> The createAction prop is required because it controls where to navigate when users click “Add Provider”. Without this, the table wouldn’t know how to initiate the provider creation flow. Properties:
  • disabled - Disable the “Add Provider” button
  • onBefore() - Called before navigation. Return false to cancel. Use for permission checks.
  • onAfter() - Called to perform navigation. This is where you navigate to your create page.
Common Patterns:
// Navigate to create page
createAction={{
  onAfter: () => navigate("/providers/create"),
}}

// Check permissions before allowing create
createAction={{
  onBefore: () => {
    if (!hasPermission("create:providers")) {
      alert("You don't have permission to create providers");
      return false;
    }
    return true;
  },
  onAfter: () => navigate("/providers/create"),
}}

// Track analytics on create intent
createAction={{
  onAfter: () => {
    analytics.track("Create Provider Started");
    navigate("/providers/create");
  },
}}

editAction

Type: ComponentAction<IdentityProvider> The editAction prop is required because it controls where to navigate when users click on a provider row. The callback receives the provider data so you can navigate to the correct edit page. Properties:
  • disabled - Disable row click navigation
  • onBefore(provider) - Called before navigation. Return false to cancel.
  • onAfter(provider) - Called to perform navigation with the selected provider.
Common Patterns:
// Navigate to edit page with provider ID
editAction={{
  onAfter: (provider) => navigate(`/providers/${provider.id}`),
}}

// Track analytics on provider selection
editAction={{
  onAfter: (provider) => {
    analytics.track("Provider Selected", {
      id: provider.id,
      name: provider.name,
      strategy: provider.strategy,
    });
    navigate(`/providers/${provider.id}`);
  },
}}

Display Props

Display props control how the component renders without affecting its behavior. Use these to hide sections or enable read-only mode.
PropTypeDescription
readOnlybooleanDisable all table actions. Default: false
hideHeaderbooleanHide the header section. Default: false

Action Props

Action props handle user interactions beyond the core navigation. These control deletion, removal, and enable/disable operations.
PropTypeDescription
deleteActionComponentAction<IdentityProvider>Delete provider permanently. Details
deleteFromOrganizationActionComponentAction<IdentityProvider>Remove provider from organization. Details
enableProviderActionComponentAction<IdentityProvider>Enable/disable provider toggle. Details

deleteAction

Type: ComponentAction<IdentityProvider> Controls permanent deletion of an SSO provider. This is destructive - the provider is deleted from your Auth0 tenant entirely. Properties:
  • disabled - Disable the delete option
  • onBefore(provider) - Called before deletion. Return false to cancel. Recommended for confirmation.
  • onAfter(provider) - Called after successful deletion.
Example:
<SsoProviderTable
  createAction={{ onAfter: () => navigate("/providers/create") }}
  editAction={{ onAfter: (p) => navigate(`/providers/${p.id}`) }}
  deleteAction={{
    onBefore: (provider) => {
      return confirm(
        `Permanently delete "${provider.display_name}"? This cannot be undone.`,
      );
    },
    onAfter: (provider) => {
      analytics.track("Provider Deleted", { name: provider.name });
      toast.success("Provider deleted");
    },
  }}
/>

deleteFromOrganizationAction

Type: ComponentAction<IdentityProvider> Controls removing a provider from the organization without deleting it from the tenant. The provider remains available to be re-added later. Properties:
  • disabled - Disable the remove option
  • onBefore(provider) - Called before removal. Return false to cancel.
  • onAfter(provider) - Called after successful removal.
Example:
<SsoProviderTable
  createAction={{ onAfter: () => navigate("/providers/create") }}
  editAction={{ onAfter: (p) => navigate(`/providers/${p.id}`) }}
  deleteFromOrganizationAction={{
    onBefore: (provider) => {
      return confirm(
        `Remove "${provider.display_name}" from this organization?`,
      );
    },
    onAfter: (provider) => {
      toast.success(`${provider.display_name} removed from organization`);
    },
  }}
/>

enableProviderAction

Type: ComponentAction<IdentityProvider> Controls the enable/disable toggle for providers. Disabled providers remain configured but users cannot authenticate through them. Properties:
  • disabled - Disable the toggle
  • onBefore(provider) - Called before toggle. Return false to cancel.
  • onAfter(provider) - Called after toggle completes.
Example:
<SsoProviderTable
  createAction={{ onAfter: () => navigate("/providers/create") }}
  editAction={{ onAfter: (p) => navigate(`/providers/${p.id}`) }}
  enableProviderAction={{
    onBefore: (provider) => {
      if (!provider.is_enabled) {
        return confirm(`Enable "${provider.display_name}" for authentication?`);
      }
      return confirm(
        `Disable "${provider.display_name}"? Users won't be able to authenticate.`,
      );
    },
    onAfter: (provider) => {
      analytics.track(
        provider.is_enabled ? "Provider Enabled" : "Provider Disabled",
        {
          name: provider.name,
        },
      );
    },
  }}
/>

Customization Props

Customization props let you adapt the component to your brand, locale, and validation requirements without modifying source code.
PropTypeDescription
schemaSsoProviderTableSchemaConfirmation field validation. Details
customMessagesPartial<SsoProviderTableMessages>i18n text overrides. Details
stylingComponentStyling<SsoProviderTableClasses>CSS variables and class overrides. Details

schema

Set custom validation rules for confirmation dialogs (e.g., type provider name to confirm deletion).
All schema fields support: regex, errorMessagedelete.providerName - Confirmation for permanent deletion remove.providerName - Confirmation for removal from organization
<SsoProviderTable
  createAction={{ onAfter: () => navigate("/providers/create") }}
  editAction={{ onAfter: (p) => navigate(`/providers/${p.id}`) }}
  schema={{
    delete: {
      providerName: {
        regex: /^.+$/,
        errorMessage: "Please type the provider name to confirm",
      },
    },
  }}
/>

customMessages

Customize all text and translations. All fields are optional and use defaults if not provided.
header - Component header
  • title, description, create_button_text
table - Table display
  • empty_message
  • columns.name, columns.strategy, columns.status
  • actions.edit_button_text, actions.delete_button_text, actions.remove_button_text
delete.modal - Delete confirmation
  • title, description
  • field.label, field.placeholder, field.error
  • actions.cancel_button_text, actions.delete_button_text
remove.modal - Remove from organization confirmation
  • title, description
  • actions.cancel_button_text, actions.remove_button_text
notifications - API responses
  • provider_delete_success, provider_delete_error
  • provider_remove_success, provider_enable_success, provider_disable_success
<SsoProviderTable
  createAction={{ onAfter: () => navigate("/providers/create") }}
  editAction={{ onAfter: (p) => navigate(`/providers/${p.id}`) }}
  customMessages={{
    header: {
      title: "Identity Providers",
      description: "Manage SSO connections for your organization",
      create_button_text: "Add Provider",
    },
    table: {
      empty_message:
        "No SSO providers configured. Add one to enable single sign-on.",
    },
    notifications: {
      provider_delete_success: "Provider deleted successfully!",
    },
  }}
/>

styling

Customize appearance with CSS variables and class overrides. Supports theme-aware styling.
Variables - CSS custom properties
  • common - Applied to all themes
  • light - Light theme only
  • dark - Dark theme only
Classes - Component class overrides
  • SsoProviderTable-header
  • SsoProviderTable-table
  • SsoProviderTable-row
  • SsoProviderTable-deleteModal
  • SsoProviderTable-removeModal
<SsoProviderTable
  createAction={{ onAfter: () => navigate("/providers/create") }}
  editAction={{ onAfter: (p) => navigate(`/providers/${p.id}`) }}
  styling={{
    variables: {
      common: {
        "--font-size-title": "1.25rem",
      },
      light: {
        "--color-primary": "#4f46e5",
      },
    },
    classes: {
      "SsoProviderTable-header": "mb-6",
      "SsoProviderTable-table": "rounded-lg shadow-sm",
    },
  }}
/>

Advanced Customization

The SsoProviderTable component is composed of smaller subcomponents and hooks. You can import them individually to build custom provider management workflows if you use shadcn.

Available Subcomponents

For advanced use cases, you can import individual subcomponents to build custom provider management interfaces. This is useful when you need to embed the table in a different layout or customize row rendering.
ComponentDescription
ProviderRowIndividual provider row with actions
ProviderDeleteModalConfirmation modal for permanent deletion
ProviderRemoveModalConfirmation modal for organization removal
ProviderStatusToggleEnable/disable toggle component
ProviderStrategyIconStrategy icon renderer (Okta, SAML, etc.)

Available Hooks

These hooks provide the underlying logic without any UI. Use them to build completely custom interfaces while leveraging the Auth0 API integration.
HookDescription
useSsoProviderTableProvider list fetching and management
useSsoProviderTableLogicUI interaction state + handlers (modals, actions)