Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.replit.com/llms.txt

Use this file to discover all available pages before exploring further.

Auth — short for authentication — is what gives your app the concept of a “user”. Without auth, every visitor is anonymous and your app can’t tell one person from another. With auth, each visitor signs in, your app knows who they are, and you can save data specific to them: their bookings, their saved cars, their preferences, their progress. Once auth is wired in, you can:
  • Save data per user — bookings, settings, content, history.
  • Gate features behind sign-in (a checkout, a profile page, an admin panel).
  • Personalize the experience by name, role, plan, or past behavior.
  • Track activity and usage by individual rather than by session.

How auth works in a Replit app

Replit ships two built-in auth options. Both are provisioned by Agent — no separate dashboard signup, no copy-pasting of OAuth keys.
  • Replit Auth — your users sign in with their existing Replit accounts. The sign-in page is Replit-branded. There’s no setup beyond asking Agent to add it.
  • Clerk Auth — your app gets its own dedicated Clerk tenant. Users create accounts inside your app, not Replit. You control the branding, the login methods, and the look and feel of the sign-in screen.
Both options handle the heavy lifting — sign-in pages, sessions, secure password handling, social logins — so your app code only has to ask, “who is the signed-in user?”

Replit Auth vs. Clerk Auth

Replit AuthClerk Auth
User accountsUsers sign in with a Replit accountUsers create accounts within your app (no Replit account needed)
BrandingReplit-branded login pageFully customizable — your app’s name, icon, and colors
SSO credentialsUses Replit’s shared OAuth appsBring your own OAuth credentials per provider
EnvironmentsSingle environmentSeparate Development and Production environments
Best forQuick setup, prototypes, apps where Replit branding is acceptableBranded apps, professional and commercial products
If you’re building a prototype or an internal tool, Replit Auth is the fastest path. If you’re building something with its own brand identity, especially something customer-facing or commercial, Clerk Auth is the better fit.

Add auth to your app

You don’t have to choose up front — you can start with one and migrate later. The fastest path is to tell Agent which one to use:
  • “Add sign-in to my app. Use Replit Auth.”
  • “Add sign-in to my app. Use Clerk Auth.”

Next steps

Replit Auth

Replit-branded sign-in with zero setup — users sign in with their Replit account.

Clerk Auth

Your own branded auth tenant — fully customizable login, separate Dev/Prod environments.

Add login

Worked example: wire Clerk Auth into a real app and test it with two customers.

Migrate from Replit Auth to Clerk

Move an existing app from Replit Auth onto a Clerk tenant.