$ show auth0-developer-hub/auth0-b2b-saas-starter
SaaStart is a B2B SaaS starter kit built with Next.js and Auth0 that provides multi-tenancy organization management, user authentication/authorization, self-service SSO configuration (OIDC and SAML), security policy management (including MFA), user profile and security settings, and SCIM provisioning capabilities. The application follows a modern Next.js App Router architecture with server and client components, uses Auth0 for identity management, and implements role-based access control with admin/member roles. Key features include organization creation and switching, user invitation workflows, domain verification for SSO, and comprehensive dashboard for managing organization settings, members, and connections.
The LLM identified 3 files worth highlighting for reuse:
Implements domain ownership verification via DNS TXT records for SSO connections. Includes development fallback for testing and proper error handling. This isolated utility could be extracted to any application needing to verify domain ownership before configuring identity providers.
A higher-order function that wraps Server Actions to enforce authentication and optional role-based access control. Demonstrates a clean pattern for protecting Next.js Server Actions with minimal boilerplate, making it easily reusable across different action types and role requirements.
Provides complete Server Actions for SCIM configuration lifecycle: creating, updating, deleting configurations and tokens. Shows proper error handling, revalidation patterns, and organization ownership verification. This pattern could be adapted for any resource management scenario requiring secure server-side mutations.