Learn how to manage verified and pending Organization domains in a unified table interface.
The DomainTable component provides a unified interface for your customers to manage their Auth0 Organization’s email domain. By verifying domain ownership, Organization administrators enable critical B2B features like Home Realm Discovery (HRD) and ensure users are automatically routed to the correct SSO provider based on their email suffix (e.g., user@acme.com).
Action props handle user interactions and define what happens when users perform domain operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
Prop
Type
Description
createAction
ComponentAction<Domain>
Create domain action.
verifyAction
ComponentAction<Domain>
Verify domain action.
deleteAction
ComponentAction<Domain>
Delete domain action.
associateToProviderAction
ComponentAction<Domain, IdentityProvider>
Associate domain to provider.
deleteFromProviderAction
ComponentAction<Domain, IdentityProvider>
Remove domain from provider.
onOpenProvider
(provider: IdentityProvider) => void
Navigate to provider from configure modal.
onCreateProvider
() => void
Navigate to create provider flow.
createActionType:ComponentAction<Domain>Controls the domain creation flow. Use onAfter to track when new domains are added.Properties:
disabled - Disable the “Add Domain” button
onBefore(domain) - Runs before the domain is created. Return false to prevent creation (e.g., if the domain format is invalid).
onAfter(domain) - Runs after the domain is successfully created. Use this to show a notification or track the event.
Example:
<DomainTable createAction={{ onBefore: (domain) => { // Validate domain format if (!domain.domain.includes(".")) { alert("Please enter a valid domain"); return false; } return true; }, onAfter: (domain) => { analytics.track("Domain Created", { domain: domain.domain }); }, }}/>
verifyActionType:ComponentAction<Domain>Controls the domain verification flow. Domain verification proves ownership via DNS TXT record.Properties:
disabled - Disable the verify button
onBefore(domain) - Runs before the verification attempt. Return false to prevent verification (e.g., to confirm DNS is configured).
onAfter(domain) - Runs after the domain is successfully verified. Use this to show a success notification.
Example:
<DomainTable verifyAction={{ onBefore: (domain) => { return confirm( `Verify ${domain.domain}? Make sure your DNS record is configured.`, ); }, onAfter: (domain) => { toast.success(`${domain.domain} verified successfully!`); }, }}/>
deleteActionType:ComponentAction<Domain>Controls domain deletion. Recommended to use onBefore for confirmation since this is destructive.Properties:
disabled - Disable the delete button
onBefore(domain) - Runs before the deletion. Return false to prevent deletion (recommended for confirmation dialogs).
onAfter(domain) - Runs after the domain is successfully deleted. Use this to track the event or show a notification.
associateToProviderActionType:ComponentAction<Domain, IdentityProvider>Controls associating a verified domain with an SSO provider. Only verified domains can be associated.Properties:
disabled - Disable the associate action
onBefore(domain, provider) - Runs before the association. Return false to prevent the association.
onAfter(domain, provider) - Runs after the domain is successfully associated with the provider.
The DomainTable component is composed of smaller subcomponents and hooks. You can import them individually to build custom domain workflows if you use shadcn.
For advanced use cases, you can import individual subcomponents to build custom domain management interfaces. This is useful when you need to embed specific modals in different contexts or customize the table layout beyond what props allow.
Action props handle user interactions and define what happens when users perform domain operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
Prop
Type
Description
createAction
ComponentAction<Domain>
Create domain action.
verifyAction
ComponentAction<Domain>
Verify domain action.
deleteAction
ComponentAction<Domain>
Delete domain action.
associateToProviderAction
ComponentAction<Domain, IdentityProvider>
Associate domain to provider.
deleteFromProviderAction
ComponentAction<Domain, IdentityProvider>
Remove domain from provider.
onOpenProvider
(provider: IdentityProvider) => void
Navigate to provider from configure modal.
onCreateProvider
() => void
Navigate to create provider flow.
createActionType:ComponentAction<Domain>Controls the domain creation flow. Use onAfter to track when new domains are added.Properties:
disabled - Disable the “Add Domain” button
onBefore(domain) - Runs before the domain is created. Return false to prevent creation (e.g., if the domain format is invalid).
onAfter(domain) - Runs after the domain is successfully created. Use this to show a notification or track the event.
Example:
<DomainTable createAction={{ onBefore: (domain) => { // Validate domain format if (!domain.domain.includes(".")) { alert("Please enter a valid domain"); return false; } return true; }, onAfter: (domain) => { analytics.track("Domain Created", { domain: domain.domain }); }, }}/>
verifyActionType:ComponentAction<Domain>Controls the domain verification flow. Domain verification proves ownership via DNS TXT record.Properties:
disabled - Disable the verify button
onBefore(domain) - Runs before the verification attempt. Return false to prevent verification (e.g., to confirm DNS is configured).
onAfter(domain) - Runs after the domain is successfully verified. Use this to show a success notification.
Example:
<DomainTable verifyAction={{ onBefore: (domain) => { return confirm( `Verify ${domain.domain}? Make sure your DNS record is configured.`, ); }, onAfter: (domain) => { toast.success(`${domain.domain} verified successfully!`); }, }}/>
deleteActionType:ComponentAction<Domain>Controls domain deletion. Recommended to use onBefore for confirmation since this is destructive.Properties:
disabled - Disable the delete button
onBefore(domain) - Runs before the deletion. Return false to prevent deletion (recommended for confirmation dialogs).
onAfter(domain) - Runs after the domain is successfully deleted. Use this to track the event or show a notification.
associateToProviderActionType:ComponentAction<Domain, IdentityProvider>Controls associating a verified domain with an SSO provider. Only verified domains can be associated.Properties:
disabled - Disable the associate action
onBefore(domain, provider) - Runs before the association. Return false to prevent the association.
onAfter(domain, provider) - Runs after the domain is successfully associated with the provider.
For advanced use cases, you can import individual subcomponents to build custom domain management interfaces. This is useful when you need to embed specific modals in different contexts or customize the table layout beyond what props allow.
Action props handle user interactions and define what happens when users perform domain operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
Prop
Type
Description
createAction
ComponentAction<Domain>
Create domain action.
verifyAction
ComponentAction<Domain>
Verify domain action.
deleteAction
ComponentAction<Domain>
Delete domain action.
associateToProviderAction
ComponentAction<Domain, IdentityProvider>
Associate domain to provider.
deleteFromProviderAction
ComponentAction<Domain, IdentityProvider>
Remove domain from provider.
onOpenProvider
(provider: IdentityProvider) => void
Navigate to provider from configure modal.
onCreateProvider
() => void
Navigate to create provider flow.
createActionType:ComponentAction<Domain>Controls the domain creation flow. Use onAfter to track when new domains are added.Properties:
disabled - Disable the “Add Domain” button
onBefore(domain) - Runs before the domain is created. Return false to prevent creation (e.g., if the domain format is invalid).
onAfter(domain) - Runs after the domain is successfully created. Use this to show a notification or track the event.
Example:
<DomainTable createAction={{ onBefore: (domain) => { // Validate domain format if (!domain.domain.includes(".")) { alert("Please enter a valid domain"); return false; } return true; }, onAfter: (domain) => { analytics.track("Domain Created", { domain: domain.domain }); }, }}/>
verifyActionType:ComponentAction<Domain>Controls the domain verification flow. Domain verification proves ownership via DNS TXT record.Properties:
disabled - Disable the verify button
onBefore(domain) - Runs before the verification attempt. Return false to prevent verification (e.g., to confirm DNS is configured).
onAfter(domain) - Runs after the domain is successfully verified. Use this to show a success notification.
Example:
<DomainTable verifyAction={{ onBefore: (domain) => { return confirm( `Verify ${domain.domain}? Make sure your DNS record is configured.`, ); }, onAfter: (domain) => { toast.success(`${domain.domain} verified successfully!`); }, }}/>
deleteActionType:ComponentAction<Domain>Controls domain deletion. Recommended to use onBefore for confirmation since this is destructive.Properties:
disabled - Disable the delete button
onBefore(domain) - Runs before the deletion. Return false to prevent deletion (recommended for confirmation dialogs).
onAfter(domain) - Runs after the domain is successfully deleted. Use this to track the event or show a notification.
associateToProviderActionType:ComponentAction<Domain, IdentityProvider>Controls associating a verified domain with an SSO provider. Only verified domains can be associated.Properties:
disabled - Disable the associate action
onBefore(domain, provider) - Runs before the association. Return false to prevent the association.
onAfter(domain, provider) - Runs after the domain is successfully associated with the provider.
The DomainTable component is composed of smaller subcomponents and hooks. You can import them individually to build custom domain workflows if you use shadcn.
For advanced use cases, you can import individual subcomponents to build custom domain management interfaces. This is useful when you need to embed specific modals in different contexts or customize the table layout beyond what props allow.