ClerkBuild a complete multi-tenant SaaS application with authentication, organizations, and subscription billingβall using Clerk's unified platform. Learn how to create a Notion-style task tracker with role-based access control, team workspaces, and seamless subscription management in Next.js.
π¦ WHAT YOU'LL BUILD β Multi-tenant task tracker SaaS app β Notion-style Kanban board with projects β Organization management with member invites β Role-based access control (RBAC) β Subscription billing with feature gates β Webhook integration for data sync β Real-time collaboration across orgs
π§ KEY CONCEPTS COVERED * Multi-tenant architecture with organizations * Authentication with Clerk's drop-in components * Organization switcher & profile management * Role-based permissions and custom roles * Subscription plans with feature flags * Billing integration with checkout flow * Webhook setup for Postgres data sync * The `auth()` function for access control * `has()` function for checking permissions & subscriptions * Active organization management * Member invitations and team workspaces
π― PERFECT FOR * Developers building B2B SaaS applications * Teams implementing multi-tenancy * Projects needing team collaboration features * Anyone adding subscription billing to apps * Learning modern authentication patterns * Migrating from separate auth/billing services
π οΈ KEY IMPLEMENTATION DETAILS 4:45 - Creating new Clerk application & API keys 5:30 - Webhook configuration for data sync 7:08 - Enabling organizations (personal vs forced) 7:40 - Organization settings, roles & permissions 8:58 - Enabling billing for organizations 9:25 - Creating subscription plans with features 11:48 - Using `auth()` for user & org context 12:15 - Implementing feature gates with `has()` 12:40 - Organization switcher component 13:10 - Pricing table drop-in component
π₯ PRO TIPS * Use `auth()` function to access userId, orgId, and session data * Check subscriptions & permissions with single `has()` function * Leverage Clerk's Shadcn theme for unified design * Webhook secrets prevent unauthorized data sync * Active org ID is key for multi-tenant queries * Feature flags on plans enable granular access control * Organization-level vs user-level billing changes architecture * Drop-in components handle complex UX automatically
π MULTI-TENANT ARCHITECTURE * Users can join multiple organizations * Only one active organization at a time * All queries filtered by active `orgId` * Role-based permissions per organization * Subscriptions attached to organizations * Member invitations with role assignment
π³ BILLING FEATURES COVERED * Creating subscription plans (Pro tier) * Feature flags for access control * Pricing table component integration * Checkout flow with test cards * User vs organization billing models * Public vs private pricing plans
π¬ Questions? Drop them in the comments! π Find this helpful? Like & subscribe for more SaaS tutorials π Turn on notifications for the RBAC deep-dive next week
Building a Notion-Style Task TrackerClerk2025-12-23 | Build a complete multi-tenant SaaS application with authentication, organizations, and subscription billingβall using Clerk's unified platform. Learn how to create a Notion-style task tracker with role-based access control, team workspaces, and seamless subscription management in Next.js.
π¦ WHAT YOU'LL BUILD β Multi-tenant task tracker SaaS app β Notion-style Kanban board with projects β Organization management with member invites β Role-based access control (RBAC) β Subscription billing with feature gates β Webhook integration for data sync β Real-time collaboration across orgs
π§ KEY CONCEPTS COVERED * Multi-tenant architecture with organizations * Authentication with Clerk's drop-in components * Organization switcher & profile management * Role-based permissions and custom roles * Subscription plans with feature flags * Billing integration with checkout flow * Webhook setup for Postgres data sync * The `auth()` function for access control * `has()` function for checking permissions & subscriptions * Active organization management * Member invitations and team workspaces
π― PERFECT FOR * Developers building B2B SaaS applications * Teams implementing multi-tenancy * Projects needing team collaboration features * Anyone adding subscription billing to apps * Learning modern authentication patterns * Migrating from separate auth/billing services
π οΈ KEY IMPLEMENTATION DETAILS 4:45 - Creating new Clerk application & API keys 5:30 - Webhook configuration for data sync 7:08 - Enabling organizations (personal vs forced) 7:40 - Organization settings, roles & permissions 8:58 - Enabling billing for organizations 9:25 - Creating subscription plans with features 11:48 - Using `auth()` for user & org context 12:15 - Implementing feature gates with `has()` 12:40 - Organization switcher component 13:10 - Pricing table drop-in component
π₯ PRO TIPS * Use `auth()` function to access userId, orgId, and session data * Check subscriptions & permissions with single `has()` function * Leverage Clerk's Shadcn theme for unified design * Webhook secrets prevent unauthorized data sync * Active org ID is key for multi-tenant queries * Feature flags on plans enable granular access control * Organization-level vs user-level billing changes architecture * Drop-in components handle complex UX automatically
π MULTI-TENANT ARCHITECTURE * Users can join multiple organizations * Only one active organization at a time * All queries filtered by active `orgId` * Role-based permissions per organization * Subscriptions attached to organizations * Member invitations with role assignment
π³ BILLING FEATURES COVERED * Creating subscription plans (Pro tier) * Feature flags for access control * Pricing table component integration * Checkout flow with test cards * User vs organization billing models * Public vs private pricing plans
π¬ Questions? Drop them in the comments! π Find this helpful? Like & subscribe for more SaaS tutorials π Turn on notifications for the RBAC deep-dive next week
#clerk #nextjs #saas #multitenant #authentication #billing #organizations #rbac #webdev #typescript #prisma #postgres #shadcn #tutorialBe enterprise ready with B2B AuthenticationClerk2026-04-20 | Clerk B2B Authentication gives you everything you need to build for enterprise, with a seamless experience for your customers and a powerful foundation for your developers.
Organizations, role-based access control, SSO, and enterprise-ready featuresβall built in and ready to go.
B2B Authentication: clerk.com/organizationsDiscover the Power of Clerks New Command Menu (βK)Clerk2026-01-06 | Clerk new Command Menu (Command+K) makes navigating the dashboard incredibly fast and intuitive. I sat down with Rafael Camargo, the engineer who built it, to walk through everything it can do.
What You'll Learn: How to use Command+K to instantly navigate anywhere in Clerk Dashboard Quick workspace and application switching without clicking through menus AI-powered help that guides you to the exact feature you need Integrated docs search for quick reference without leaving the dashboard Upcoming features: shortcuts, more actions, and enhanced workflows
Perfect for: β Power users managing large Clerk accounts β Developers new to Clerk looking to explore features faster β Teams juggling multiple workspaces and applications β Anyone tired of clicking through nested menus
Timestamps: 0:00 - Introduction 0:53 - Meet Rafael Camargo from Clerk's Dashboard Team 1:29 - Command Menu Demo Begins 3:40 - Power User Workflows: Quick Navigation 4:46 - Helping New Users: Docs Search Integration 7:03 - AI Assistant: "Where Can I Change My Domain?" 9:21 - Exploring Features You Didn't Know Existed 9:56 - What's Next: Actions, Shortcuts & More
If you're building with Clerk, this feature will save you hours of clicking. Try it out and let us know what you think in the comments!Client Trust: A New Defense Layer Against Credential Stuffing AttacksClerk2025-12-30 | A few weeks ago, Clerk released Client Trust - a powerful new defense layer against credential stuffing attacks. In this video, I'll explain what credential stuffing is, show you how to protect your Next.js app using this feature, and share essential cybersecurity best practices.
What You'll Learn: 0:00 - Introduction to Client Trust 0:15 - What is Credential Stuffing? 0:45 - Defense Strategies Against Credential Stuffing 1:30 - Clerk's Security Features 1:50 - How Client Trust Works 2:21 - Enabling Client Trust in Clerk Dashboard 3:15 - Wrap Up & Happy Holidays
Key Topics Covered: β Understanding credential stuffing attacks and password reuse risks β Multiple defense layers: rate limiting, bot detection, MFA β How Client Trust treats new devices as untrusted β Zero-day credential leak protection β Enabling Client Trust in existing applications β SDK version requirements and custom flow implementation
Client Trust is included in all Clerk plans and automatically enabled for new applications. For existing apps, you'll need to enable it manually through the dashboard as shown in this tutorial.
#Clerk #WebSecurity #CredentialStuffing #NextJS #Authentication #CybersecurityInstall Clerk Using Shadcn RegistryClerk2025-12-16 | Learn how to add Clerk authentication to your Next.js app using the new Shadcn Registry integration. Install pre-built auth components, pages, and config with the familiar shadcn add command. Get a complete auth setup in seconds or add components individually.
π― PERFECT FOR Developers using Shadcn UI Teams building MVPs needing auth fast Next.js projects wanting consistent design Anyone familiar with Shadcn CLI Projects needing quick auth integration
π₯ PRO TIPS Add the clerk namespace once, use it everywhere Quick start gets you 80% there in one command Keyless sign-in lets you test immediately Add individual components for granular control Theme support works out of the box Claim your app later with real API keys
π¬ Questions? Drop them in the comments! π Find this helpful? Like & subscribe for more Clerk tutorials π Turn on notifications for new authentication videos
#clerk #shadcn #nextjs #react #authentication #webdev #javascript #tutorial #uiIntroducing API Keys: Machine-to-Machine Auth with ClerkClerk2025-12-11 | Master API key authentication in Clerk with this complete tutorial. Learn how to enable machine-to-machine authentication, allow users to create and manage API keys, and verify tokens in your backend APIs. Perfect for building developer-facing features and enabling programmatic access to your services.
β±οΈ CHAPTERS 0:00 Introduction - API Keys Feature Overview 0:48 Enabling API Keys in Clerk Dashboard 1:20 API Keys with Organizations 1:52 Creating an Organization 2:11 Dashboard Walkthrough - Components Overview 3:22 Creating an Agent (Demo Service) 3:48 Creating Your First API Key 4:37 Testing API Authentication with cURL 5:28 Backend Implementation - Route Handler Setup 6:15 Authenticating with acceptsToken Array 6:50 Revoking API Keys
π¦ WHAT YOU'LL BUILD β Next.js app with API key authentication β User-facing API key management dashboard β Backend API routes with token verification β Organization-level API keys β Create, manage, and revoke key flows β Bearer token authentication
π§ KEY CONCEPTS COVERED * Machine-to-machine authentication * API key creation and management * Backend token verification with Clerk SDKs * acceptsToken configuration (API keys + session tokens) * Organization-scoped API keys * User-scoped API keys (B2C) * Drop-in API key management component * Revoking and expiring keys
π‘ CLERK COMPONENTS USED β¨ API Keys management component β¨ Organization Profile β¨ Organization Switcher β¨ Clerk auth() with acceptsToken β¨ Organization enforcement
π― PERFECT FOR - Developers building API-first products - Teams adding programmatic access to their apps - SaaS platforms needing developer APIs - B2B apps with organization-level authentication - Anyone building AI agents or automation tools
π₯ PRO TIPS * Use acceptsToken to support both session tokens and API keys * Enable organizations for team-scoped API keys * Set expiration dates for security best practices * Use the drop-in component for instant UI * Revoke keys immediately when compromised
π¬ Questions? Drop them in the comments! π Find this helpful? Like & subscribe for more Clerk tutorials π Turn on notifications for new authentication videos
#clerk #authentication #apikeys #nextjs #react #webdev #javascript #developer #api #backend #tutorialNext.js 16: Master Partial Pre-rendering & Cache Components in 24 MinutesClerk2025-12-08 | Master Next.js 16's stable partial pre-rendering in this comprehensive tutorial. Learn how to combine static speed with dynamic personalization using cache components, Suspense boundaries, and the new `use cache` directive. Build a real e-commerce app and see the mixed rendering model in action.
π― PERFECT FOR * Developers upgrading to Next.js 16 * Teams optimizing app performance * Anyone building dynamic apps at static speed * Learning modern caching architectures * Projects needing granular render control
π₯ PRO TIPS * Use `use cache` for rarely-changing async data * Use Suspense for request-specific dynamic content * Request APIs (cookies/headers) can't be cached * `new Date()` and `Math.random()` need explicit handling * Cache life profiles: days, weeks, minutes * Component-level control beats route-level
πΊ WHAT'S NEXT Part 2: Authentication in Next.js 16 with partial pre-rendering Part 3: Cart functionality with cache components Part 4: Platform adapters & deployment strategies
π¬ Questions? Drop them in the comments! π Find this helpful? Like & subscribe for more Next.js tutorials π Turn on notifications for the authentication video next week
#nextjs #nextjs16 #react #webdev #javascript #performance #caching #partialprerendering #suspense #tutorialReact security updateClerk2025-12-05 | A critical vulnerability has been identified in the React Server Components (RSC) protocol. The issue is rated CVSS 10.0 and can allow remote code execution when processing attacker-controlled requests in unpatched environments.
This vulnerability originates in the upstream React implementation (CVE-2025-55182). This advisory (CVE-2025-66478) tracks the downstream impact on Next.js applications using the App Router.
React advisory blog post https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
NextJs security advisory nextjs.org/blog/CVE-2025-66478How to add subscription billing to your SaaS app (Clerk Billing + Next.js)Clerk2025-09-15 | Learn how to add subscription billing to your SaaS app using Clerk Billing and Next.js. This step-by-step guide covers both B2C (individual users) and B2B (organizations), showing how to configure plans, enable free trials, and manage upgrades or downgrades β all directly from the Clerk Dashboard.
With Clerk Billing you can: β¦Ώ Implement recurring payments and subscription plans without custom logic β¦Ώ Use drop-in UI components like PricingTable and checkout β¦Ώ Manage users, plans, and feature flags in one place β¦Ώ Support both B2C and B2B SaaS billing models β¦Ώ Simplify free trials, upgrades, and downgrades automatically
π What youβll learn in this video: β¦Ώ How to set up Clerk Billing in a Next.js app β¦Ώ Creating subscription plans and free trials β¦Ώ Adding a pricing table and checkout flow β¦Ώ Enforcing feature access with plan checks β¦Ώ Transitioning from B2C to B2B with Clerk Organizations
Chapters 00:00 β How Clerk Billing works for SaaS apps 02:49 β Set up subscription billing in a Next.js B2C app 05:44 β How to create plans and features in Clerk Billing 08:57 β Managing users, plans, and free trials 11:44 β Transitioning to B2B SaaS with Clerk Organizations 14:24 β B2B subscription billing implementation & wrap-upBETTER CONVERSIONS using Free Trials in Clerk BillingClerk2025-09-02 | Learn how you can increase your SaaS conversion rates by allowing users to give it a test run before paying. Using Clerk Billing, you can enable Free Trials in a snap!
Simply toggle the setting for the plans you want users to try, set a trial period, and everything else is handled for you in our beautifully designed drop in components.Introducing Free Trials in Clerk BillingClerk2025-09-02 | Clerk Billing offers best-in-class UX for your customers and even better DX for your developers, and it just got even better!
Weβve added a simple βFree trialβ toggle that lets you offer time-limited trials on any planβno custom logic, no webhook management, no surprise edge cases. Users are automatically converted to a paid plan when their trial period lapses.
In this video, weβll show you how to enable trials, set durations, and demonstrate how the PricingTable component automatically updates as you make changes to your Clerk Billing configuration.Setting up Clerk for productionClerk2025-08-27 | In this video, we guide you through the process of transitioning your Clerk application from development to production.
β Understanding dev vs. production instances. β Setting up OAuth credentials for production. β Deploying to Vercel with Next.js Clerk Starter. β Configuring DNS settings and SSL certificates.
Key takeaways: β Understanding dev vs. production instances. β Setting up OAuth credentials for production. β Deploying to Vercel with Next.js Clerk Starter. β Configuring DNS settings and SSL certificates.
Chapters 00:00 Introduction to Clerk and Deployment Overview 02:48 Development vs. Production: Key Differences 06:02 Setting Up a Custom Domain on Vercel 08:38 Creating a Production Instance in Clerk 11:23 Configuring OAuth Credentials for Production 14:23 Finalizing Production Setup and API Keys 17:07 Authentication Across Subdomains and DomainsAuthentication across different domainsClerk2025-08-20 | Clerk supports sharing authentication state across different domains.
π Start building with Clerk for free (10,000 users & 100 orgs) ππΌ clerk.comAuthentication across different domainsClerk2025-08-18 | In this video, we'll discusses the process of sharing authentication across different domains using Clerk, a user management platform. We'll explains various use cases for multi-domain authentication, including scenarios for businesses with multiple top-level domains and white-label SaaS products. The discussion includes a step-by-step guide on setting up Clerk with Next.js applications, configuring satellite domains, and demonstrating the authentication state sharing in action.
π Start building with Clerk for free (10,000 users & 100 orgs) ππΌ clerk.com
Key takeaways: β You can share authentication state across different top-level domains. β Clerk allows for seamless user navigation between multiple domains. β Different use cases include white-labeling and multi-tenant applications. β Setting up Clerk requires creating a primary domain and satellite domains. β In production, DNS records must be configured for satellite domains. β The demonstration shows sharing authentication state across domains.
Chapters 00:00 Sharing Authentication Across Domains 03:03 Setting Up Clerk for Multi-Domain Authentication 05:43 Configuring Next.js Applications for Authentication 08:35 Demonstrating Authentication State SharingMCP Server Support for Next.jsClerk2025-08-15 | We're excited to announce server-side support for the Model Context Protocol (MCP) in Next.js applications using Clerk authentication. This enables your users to securely grant AI applications like Claude, Cursor, and others access to their data within your app.Model Context Protocol (MCP) vs APIClerk2025-08-13 | We're excited to announce server-side support for the Model Context Protocol (MCP) in Next.js applications using Clerk authentication. This enables your users to securely grant AI applications like Claude, Cursor, and others access to their data within your app.Unlocking the Power of MCP ServersClerk2025-08-11 | This conversation delves into the concept of MCP servers and their role in facilitating authentication for AI applications. Jeff explains how MCP allows AI applications to access user data securely, emphasizing the importance of OAuth as the foundational protocol. The discussion covers various use cases for MCP integration, the architectural considerations developers must take into account, and the tools provided by Clerk to simplify the process of building MCP servers. The conversation concludes with a demonstration of connecting LLM applications to the MCP server built in Next.js, showcasing the practical implementation of the discussed concepts.
Key takeaways: β¦Ώ MCP servers facilitate user permission for AI applications to access private data. β¦Ώ MCP standardizes the way applications provide tools and resources to LLMs. β¦Ώ OAuth is the underlying protocol for MCP, enabling secure data sharing. β¦Ώ Developers need to consider architectural changes when implementing MCP. β¦Ώ Clerk provides tools to simplify the creation of MCP servers. β¦Ώ MCP can be used with or without authentication, depending on the use case. β¦Ώ MCP allows for dynamic interaction with user data across applications. β¦Ώ The integration of MCP can enhance user experience in AI applications. β¦Ώ Clerk's support for MCP aims to streamline the development process.
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more content like this.
Chapters 00:00 Introduction to MCP Servers and Authentication 03:01 Understanding MCP and Its Applications 05:53 The Role of Authentication in MCP 09:01 Building Applications with Clerk and MCP 11:52 OAuth: The Foundation of MCP 15:06 Use Cases for MCP Integration 17:52 MCP Without Authentication 21:04 MCP vs APIs: Understanding the Differences 23:51 Implementing MCP Servers with Clerk 26:51 Setting Up an MCP Server in Next.js 29:49 Architectural Considerations for MCP Services 32:51 Final Thoughts on MCP and Future Directions 40:24 Understanding Tool Creation in MCP 41:58 Securing Endpoints and Metadata 43:42 OAuth Authorization Code Flow Explained 47:05 Access Tokens and User Consent 48:36 Well-Known Endpoints in OAuth 51:48 Modernizing OAuth Standards 55:08 Implementing MCP Endpoints 56:57 Connecting MCP Clients to ServersClerk components now support a dedicated shadcn/ui themeClerk2025-08-08 | Clerk components now support a dedicated shadcn/ui theme that automatically matches your application's existing shadcn/ui theme configuration. This ensures Clerk's authentication UI feels native to your shadcn/ui-based applications.
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js guides.Clerk now supports theming via CSS variablesClerk2025-08-06 | You can now customize the theme of Clerk components by defining Clerk CSS variables in your application's stylesheets, no CSS-in-JS required!
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js guides.It just got easier to customize Clerk UI componentsClerk2025-08-04 | Clerk now supports theming via CSS variables and has a dedicated shadcn/ui theme that automatically matches your application's existing shadcn/ui theme configuration.
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js guides.
Chapters 00:00 Introduction to Customizing Clerk UI Components 00:55 The Journey of Theming Clerk Components 07:19 Exploring Themes and CSS Support 11:15 Diving into Element Customization 13:56 Understanding the Simple Theme 15:32 Transitioning to New Theme Properties 17:09 Integrating Custom Themes 19:03 Utilizing CSS Variables for Customization 22:06 Future Improvements and SummaryAdd authentication in React using ClerkClerk2025-07-30 | Implement authentication and user management the React way - with hooks and components. This tutorial will demonstrate how to create a new React app using Vite and add authentication to it using Clerk.
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js guides.React Authentication Tutorial: How to Use Clerk with Vite + React Router (Complete Guide)Clerk2025-07-28 | Learn how to use Clerk with React in this complete authentication tutorial. Build a Vite React app with custom sign-in pages, React Router integration, and user management components in under 10 minutes.
π― PERFECT FOR - Developers learning React authentication - Teams building MVPs needing auth fast - Anyone wanting to avoid building OAuth from scratch - React projects using Vite or React Router
π¬ Questions? Drop them in the comments! π Find this helpful? Like & subscribe for more React tutorials π Turn on notifications for new videos
#react #authentication #vite #clerk #reactrouter #webdev #javascript #tutorialIts easier than ever to integrate Clerk into your Vercel projects.Clerk2025-07-23 | Clerk is now available on the Vercel Marketplace. With one-click setup, automatic environment variable sync, and unified billing through Vercel, it's easier than ever to integrate Clerk into your Vercel projects.
With the integration, you get access to: β Instant provisioning of Clerk apps from your Vercel dashboard β Complete user management with hosted dashboards, sessions, and roles β Built-in and scalable billing and subscription management
π Get started with Clerk on the Vercel Marketplace. ππΌ vercel.com/marketplace/clerkEnforce organization-centric access to your B2B applicationClerk2025-07-21 | This guide demonstrates how to hide a user's personal account when using Clerk organizations in order to appear as if they only have access to organizations, and how to limit access to your application to only users with active organizations, further enforcing organization-centric access. This is useful for applications that are built for organizations only, such as B2B applications.
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js SaaS guides.Multi-tenant authentication using Clerk organizationsClerk2025-07-16 | Clerk Organizations makes it easy to implement multi-tenant authentication and role-based access control (RBAC) in a B2B SaaS application.
Links & Resources: β’ π Clerk Organizations Documentation: clerk.com/docs/organizations (learn more about settings, SSO, and usage) β’ π Start Building with Clerk for Free: clerk.com (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth)How to build a multi-tenant task manager using Clerk organizationsClerk2025-07-14 | In this video, weβll walk through how to use Clerk to build a complete multi-tenant experience into your app.
Youβll learn how to: β¦Ώ Let users create and join organizations β¦Ώ Invite users to organizations with specific roles β¦Ώ Scope authentication and session logic by organization β¦Ώ Use our organization switcher to switch between multiple tenants β¦Ώ Enforce role-based access control (RBAC) per organization β¦Ώ Configure custom domains with Clerkβs Verified Domains
π Start Building with Clerk for Free (10,000 MAUs & 100 MAOs free - startup friendly plans that scale with your growth) ππΌ clerk.com
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js SaaS guides.Build Multi-Tenant SaaS Authentication in Next.js (Organizations, RBAC, Verified Domains)Clerk2025-07-07 | Learn how to implement multi-tenant authentication for B2B SaaS applications using Clerk and Next.js. We'll build organization management with roles, permissions, verified domains, and automatic member invitationsβall in under 21 minutes.
This video explores how Clerkβs Organizations feature makes it easy to implement multi-tenant authentication and role-based access control (RBAC) in a B2B SaaS application (SaaS B2B). Aimed at early-stage SaaS founders and full-stack developers using React frameworks like Next.js, it combines education with a live demo to show you how to manage multiple tenants (organizations), user roles, and permissions from scratch.
Youβll learn how multi-tenancy (supporting multiple organizations in one app) is handled seamlessly by Clerkβs platform. Watch as we enable Organizations in a Next.js project and integrate Clerkβs pre-built React components for organization management. By the end, youβll understand how to onboard entire teams, enforce granular access controls, and simplify your appβs multi-tenant architecture.
Key Features Covered: β’ Verified Domains: Automatically restrict or invite users by email domain (e.g. @company.com) for secure, company-specific sign-ups β’ Drop-in Components: Use Clerkβs pre-built React components (like OrganizationSwitcher) for instant org creation, switching, and management in your app. No custom UI needed! β’ Granular Roles & Permissions: Define custom roles (admin, member, etc.) and fine-tune permissions for each organization, out-of-the-box. This built-in RBAC saves you from writing complex authorization logic.
If you found this helpful, let us know in the comments! Feel free to ask questions, and donβt forget to like & subscribe for more React/Next.js SaaS guides.
Chapters: 0:00 Introduction to Multi-Tenant Authentication 0:52 What are Organizations? (GitHub Example) 2:08 Enabling Organizations in Clerk Dashboard 2:28 Dashboard Settings Walkthrough 4:00 Roles & Permissions Overview 5:19 Two Ways to Create Organizations 6:08 Drop-in Components Overview 6:47 Next.js Integration Demo 8:15 Creating Your First Organization 9:41 Organization Profile Component 10:05 Managing Members & Invitations 10:51 Verified Domains Setup 12:09 Domain-Based Auto-Invites Demo 13:40 Creating Custom Roles & Permissions 15:23 Authorization with has() Function 17:40 Implementing Permission Checks in Code 20:08 Database Architecture Considerations 20:48 Wrap-upUse the `has` function to protect areas of your Next.js application!Clerk2025-06-02 | Learn how to use Clerk's `has` helper function to protect individual components or entire sections of your Next.js application using one of the following user properties:
- Their role in the active organization - Permissions included in their role - The plan they are subscribed to (using Clerk Billing) - Features of the plan they are subscribed toHow does Clerk integrate with Supabase?Clerk2025-04-29 | Learn how Clerk and Supabase integrate to verify user identity and protect data in the Postgres database.
π User Authentication: User signs up with Clerk and gets a JWT token for secure access to Supabase data. π Token Validation: Supabase checks token via Clerkβs JWKS endpoint to verify its authenticity. π‘οΈ Authorization with RLS: Row-Level Security (RLS) in PostgreSQL ensures users only access their own data based on JWT claims. π Automatic Role Assignment: Clerk adds role claims to each token automatically for compatibility with Supabase setups.Build B2B Apps Easily with Clerks OrganizationsClerk2025-04-29 | Learn to implement Clerk's Organizations feature in your B2B app with this 60-second tutorial. See how to set up organizations, invite users, and manage user permissions efficiently. Perfect for developers building reliable multi-tenant applications.
#b2b #usermanagement #nextjsHow Clerk integrates with SupabaseClerk2025-04-17 | In this technical deep dive, we'll explore how to integrate Clerk with Superbase, a scalable and secure database platform. You'll learn how to use Row Level Security (RLS) to ensure that only authorized users can access specific records in your database. We'll also cover the process of setting up the integration, including creating tables, configuring RLS policies, exploring how RLS affects the data in the tables. By the end of this video, you'll have a solid understanding of how Clerk and Superbase work together to provide a simple, secure, and scalable solution to building applications.
- Link to the source: github.com/bmorrisondev/quillmate - Get started with Clerk and Supabase: clerk.com/docs/integrations/databases/supabaseBuild your own Next.js sign-in and sign-up pages with ClerkClerk2024-08-09 | In this video, @bookercodes at Clerk shows you how to use the SignIn and SignUp components with the Next.js optional catch-all route in order to build custom sign-in and sign-up pages for your Next.js app.
Read the written version of this guide on the Clerk documentation -clerk.com/docs/references/nextjs/custom-signup-signin-pages?utm_source=youtube&utm_medium=video&utm_campaign=custom-auth-pages-videoAn introduction to Clerk ElementsClerk2024-08-01 | Clerk's pre-built UI components are still the quickest and easiest way to add authentication and user management into your applications, but what about those times when you need even *more* customisation? That is where Clerk Elements (Beta) comes into play! π Watch on as @bookercodes at Clerk teaches you how to create bespoke authentication user experience with Elements. You can even bring your own components and plug them into Clerk!
β° TIMESTAMPS 00:00 What is Clerk? 01:00 What are Elements? 02:04 How to style them 02:54 Outro
Content ID RP19BLRHOZNUUVFBEnrich PostHog events with Clerk user dataClerk2024-06-21 | In this video, you'll learn how to use the @PostHog `identify` function along with information about your Clerk users to connect the events logged in PostHog back to the user.
PostHog Next.js onboarding docs: posthog.com/docs/libraries/next-js Read the written version of this video: clerk.com/blog/how-to-use-clerk-with-posthog-identify-in-nextjsFast Next.js App Router Authentication and User Management with ClerkClerk2024-06-13 | Learn how to add authentication and user management to your Next.js app using Clerk. Follow along as @bookercodes from Clerk shows you how to set up sign-up, sign-in, and secure user management with Clerk components.
β° TIMESTAMPS 00:00 - Introduction 01:14 - Overview of the project 01:28 - Setting up Clerk and Next 04:31- Build your own sign-up and sign-in pages 07:19 - Accessing user data in server-side component with the currentUser function 08:35 - Protecting Next.js routes with middleware 09:21 - Fetching and display user-specific data with the auth function
ABOUT CLERK πͺ Need more than just a sign-in box? Clerk is a complete suite of embeddable UIs, flexible APIs, and admin dashboards to authenticate and manage your users. Learn more here π go.clerk.com/authenticationPower your next app with Clerk + SupabaseClerk2023-01-12 | This video shows you how to start with Supabase and Clerk using RLS and JWT templates.
- JWTs - Supabase + Clerk - Using RLS and custom RLS.
=== Links ==== Clerk homepage: https://clerk.dev to get a free account today! Clerk Supabase Docs: https://clerk.dev/docs/nextjs/supabaseTRPC + CLERK - Move fast break nothing, secure everythingClerk2022-12-15 | This video describes how to integrate Clerk into a TRPC application. Once you finish his tutorial, you will understand the usage of: