Why Clerk?

What Is Clerk Pn Clerk handles authentication and user management so you don’t have to build it from scratch. With just a few prompts and config steps, you get:
  • Secure sign-in & sign-up (social, password, MFA)
  • Prebuilt UI components: user profiles, org management, impersonation
  • Support for B2B apps (teams, roles, invitations)
  • Integration with Supabase, Stripe (coming soon), and more
  • Waitlist mode to manage early access
  • Generous free tier: 10K MAUs

Step-by-Step Integration Guide

Here is a step-by-step guide:
1

Set Up Your Clerk App

1

Step 1

Create a Clerk Account → Clerk.com
2

Step 2

In the Clerk dashboard, create a new app
1

Step 1

Sign in to Clerk & create a new appCreate Clerk Application Pn
2

Step 2

Enable desired authentication providers (e.g. Google, GitHub)
3

Step 3

Enable “Waitlist” under Configure > RestrictionsClerk Waitlist Pn
4

Step 4

Copy your Public API KeyClerk Api Key Pn
3

Step 3

Add Clerk to Your Lovable App
1

Step 1

In Lovable, add Clerk as your authentication provider.Prompt Lovable:
Let’s build a beautiful project and task management app in the style of Asana. Users should be able to login and signup using Clerk for authentication and user management. Let’s start by building a great looking homepage and use Clerk’s waitlist component to let users join while we build the rest of the app.
Asana Clone Lovable Pn
2

Step 2

Paste your Public API Key when asked
3

Step 3

Lovable scaffolds the login and sign-up pagesWaitlist Component Clerk Pn
4

Step 4

Deploy & test — you’re now using Clerk Auth
2

Activate Waitlist Mode (Optional)

Why use a waitlist? – Gather early users before launching your app!
Use Clerk’s built-in waitlist to collect users pre-launch.
1

Step 1

In Clerk dashboard: Configure > Restrictions > Waitlist
2

Step 2

New sign-ups will show as pending
3

Step 3

  • Users who sign up will now be pending approval
  • Admins can approve users from the Clerk dashboard
Clerk Waitlist Pending Pn
4

Step 4 (Bonus)

Customize waitlist emails (branding, content)Clerk Email Templates PnSms Code Verification Pn
3

Managing Users & Teams in Clerk

Set up team-based access in your app.
1

Step 1

In Clerk dashboard: enable OrganizationsOrganization Management Clerk Pn
2

Step 2

Define roles (Admin, Member, Viewer, etc.)
3

Step 3

Invite users to your org by email
4

Step 4

Assign roles and permissions via dashboard
5

Step 5

Prompt Lovable to:
Ask users to create/join an organization after sign-up
Clerk Organization Create Pn
Using Clerk’s User Profile Component
  • Provides a prebuilt user management dashboard
  • Supports social logins & password authentication
  • Users can manage their own accounts & 2FA
Clerk Organization Members Pn
4

Impersonation Mode (For Admins)

What is Impersonation Mode?Admins can log in as any user to troubleshoot issues
Troubleshoot your app as if you were a specific user.
1

Step 1

In Clerk dashboard > Users, click on a userImpersonate User Clerk Pn
2

Step 2

Click Impersonate
3

Step 3

View your app from their perspective
4

Step 4

Security: impersonators can’t perform sensitive actions (e.g. change password)
5

Integrate with Supabase (Advanced)

Combine Clerk Auth with Supabase backend.Supabase Clerk Pn
Why integrate with Supabase?
  • Store user data in a database
  • Secure authentication with JWT tokens
  • Connect authentication to app features
How to integrate:
1

Step 1

In Supabase, go to Settings > API > JWT Secret (documentation)Supabase Clerk Integration Doc PnSql Editor Supabase Pn
2

Step 2

In Clerk: JWT Templates > Add Supabase, paste JWT secretSupabase Api Key Clerk PnJwt Template Clerk PnJwt Template Clerk Configuration Pn
3

Step 3

Enable Clerk as an authentication providerUpdate RLS policies to use auth.uid() from ClerkPrompt Lovable to:
Let’s setup supabase to integrate with Clerk. Clerk has been configured with a Supabase secret. Here’s an example of implementing the supabase client using Clerk. Use this as a reference.[Supabase client configuration import]
4

Step 4

Confirm Clerk-issued tokens are accepted by SupabaseSupabase Tasks Table Pn
6

Add a Custom Domain (Optional)

Why use a custom domain?Boosts brand recognition & trustMore information here.
1

Step 1

In Lovable: Settings > Custom DomainCustom Domain Lovable Pn
2

Step 2

Enter your purchased domain (e.g. app.yourcompany.com)
3

Step 3

Lovable auto-configures DNS (no need to leave Lovable)
4

Step 4

Deploy & test your app with the new domain.
5

Step 5

Done ✅ — your app is now white-labeled
7

Final Thoughts & Next Steps

Your app now has:
  • Secure authentication with Clerk
  • A waitlist to collect early users
  • User & team management features
  • Supabase database integration
  • A professional custom domain

Bonus: Build B2B Features in Minutes

Clerk supports:
  • Role-based access for organizations
  • Invite flows (email-based, pre-built UI)
  • Organization profile customization (logo, name)
  • Multi-org switching (e.g. Slack-style)
Ask Lovable to:
Add organization switcher UI
Let users invite teammates

Tips & Troubleshooting

  • Already using Supabase Auth? You can switch to Clerk without rewriting your app logic. Just configure JWT correctly and swap auth provider.
  • Email customization: Clerk lets you edit all transactional email templates (waitlist, invitations, approvals).
  • Mobile login: Clerk supports passkeys, OTP, and SMS — no extra config needed in Dev Mode.
  • Compliance: Clerk is SOC2, HIPAA, and GDPR compliant.

Frequently Asked Questions (FAQ)

Want a question added to this FAQ? Let us know on Discord!

Final Thoughts

Clerk turns authentication into a prompt. You don’t need to build it yourself. With just a few clicks and prompts, your app now has:
  • Secure, scalable authentication
  • Team & organization management
  • Impersonation tools for debugging
  • Supabase-backed data and access control
  • Custom domain support for a polished UX