Waitlist Mode
Flip one config flag to turn the app into a pre-launch capture page - signups create accounts and collect emails but cannot sign in until you launch.
Waitlist mode is a single flag in @repo/config, read in packages/auth/src/config.ts. It reshapes the landing surface, the auth emails, and the post-signup redirects: signups still create accounts, but nobody can log in until you launch.
The flag
// packages/config/src/index.ts
export const config = {
waitlist: false, // default - flip to true for pre-launch
};| State | Behavior |
|---|---|
false (default) | Normal app: signup, verification, auto sign-in, full marketing site |
true | Pre-launch capture: accounts created but inert, hero and CTA become email forms |
What flips when true
| Surface | Effect |
|---|---|
| Signup | Better Auth still records the user row, so you own the email list, but the visitor is not signed in |
| Verification + magic-link email | Both send the waitlist-confirmation template, subject You're on the {config.siteName} waitlist! |
autoSignInAfterVerification | Becomes !config.waitlist, so confirming the email starts no session |
| Hero & final CTA | Render an inline email field submitting via authClient.signIn.magicLink, threading the Turnstile token when config.captcha.enabled |
| Navbar | Shows a single Join button that scrolls to the hero |
| Dashboard, auth, onboarding layouts | Redirect visitors back to the landing page |
The confirmation email
The waitlist-confirmation template lives at packages/mail/src/templates/waitlist-confirmation.tsx, takes a single verificationUrl prop, and is delivered through the provider set in config.email.provider. Its copy reads "You're Almost There!" and asks the subscriber to confirm their email to secure their spot - no login follows.
The template body hardcodes "This link will expire in 24 hours", but the hero and CTA forms submit magic links, whose tokens expire in 15 minutes (expiresIn: 900 in packages/auth/src/config.ts). Adjust the copy or the magic-link expiresIn to match.
Launching
Set config.waitlist back to false and redeploy. New and returning users get the normal signup, verification, and auto sign-in flow; accounts created during waitlist mode keep their existing rows and become usable immediately, so confirm your launch flow before flipping.
AI Agents & Crawlers
Serve markdown to AI agents by content negotiation, declare crawler rules and content signals in robots.txt, and publish an API catalog.
Onboarding
Gate every new user through a post-signup profile step that also creates their first organization and kicks off the welcome email sequence.