Vibe-Code Auth That Doesn't Break
Auth recipes for Lovable, Bolt, v0 and Replit projects that have to survive real users
What it fixes
- A symptom-to-fix guide for 12 common auth failure modes
- A decision guide for choosing your auth setup
- Supabase row-level security policies explained and generated for your own schema
- Route protection and session handling recipes that avoid random logouts
- A hardening sequence to run after any AI-generated auth setup
Look inside
Real files from this kit. Open any unlocked one to read it; the rest unlock when you get the kit.
Vibe-Code Auth That Doesn't Break
# Vibe-Code Auth Recipes Copy-paste prompt recipes to add **real, secure** auth to apps built with Lovable, Bolt, Cursor, and Replit. Your AI-generated auth works on localhost. This pack is about why it breaks — or leaks — with real users, and the exact prompts to fix it. AI-generated code can ship with security flaws, and auth is where that hurts most. Every recipe ends with a **verify-it-actually-worked / security checklist** because "it logged me in" is not the same as "it's secure." ## The three rules everything here enforces 1. **Never commit or expose secrets.** Publishable/anon keys are meant to be public; `service_role`, secret keys, and DB URLs are server-only, always. 2. **Never trust the client.** The browser is the attacker's machine. Every real check runs on the server and in the database — client-side redirects are UX, not security. 3. **Always enable RLS (Supabase).** The anon key ships in your JS by design; with RLS off, that key reads your whole database. This has caused public data leaks in AI-built apps. ## How to use 1. Start with `recipes/00-choose-your-auth.md` — pick Supabase Auth, Clerk, or Auth.js once. 2. Open your tool's edition in `editions/` — it tells you what's different (native integrations, where keys live, what the tool won't do for you). 3. Paste the relevant recipe prompts. Run each recipe's checklist. 4. Before you ship, run `guides/auth-hardening-sequence.md` top to bottom. ## Contents ``` recipes/ 00-choose-your-auth.md Decision guide: Supabase vs Clerk vs Auth.js (guide only; no Auth.js setup recipe) supabase-email-password.md Cookie sessions, not localStorage clerk-setup.md Middleware that protects the right routes oauth-google.md OAuth + the callback route tools forget
Everything in the folder
Playbooks
- Auth Hardening Sequence. run after any AI-generated auth setup
Templates
- Supabase Email and Password recipe
- Google OAuth recipe
- Row-Level Security Policies recipe
- Session Handling recipe
- Protect Routes recipe
- Clerk Setup recipe
Guides
- Choose Your Auth. decision guide for your platform and scale
- 12 Auth Failure Modes in Vibe-Coded Apps. symptoms, causes, fixes
- Security Pitfalls guide
- Edition notes. short per-tool notes for Lovable, Bolt, Replit and Cursor
How to install
- Download the folderIt is available as soon as you pay, and again any time from your account.
- Open the install note for your toolInside the folder, start with the README. It says which file goes where for the tool you use.
- PasteCopy the files into your AI's instructions, project or rules, as the note describes. No software to run.
Who it's for
Indie hackers and founders whose AI-generated app auth works in development and fails for real users, or who want to pick the right auth approach before they build.
Who it isn’t for
People who are not yet building with these tools. The files assume you already work in them. A kit is files you use, not a course.
Questions
Why does auth work in development but fail for real users in my AI-built app?
Usually it is one of a handful of known failure modes: redirect URLs, session refresh, row-level security or middleware scope. This kit lists twelve such failure modes with symptoms, causes and fixes, and gives repair prompts for Lovable, Bolt, v0 and Replit.
Is this a course?
No. A course teaches you how to maybe build the thing. A kit is the thing: working agent files, templates, and playbooks you install and run the same afternoon. You are buying the artefact, not the explanation.
What exactly do I get?
4 guides, 6 templates, 1 playbook — everything listed on this page, delivered as instant downloads from your account the moment checkout completes. Buy once, own forever, run in your own stack.
Which tools does this work with?
The files are written for the tools named on this page and drop into your existing setup. No KITS-specific runtime, no lock-in — plain files you keep.
Do I need to be technical?
This kit assumes you already build with the tools it targets. If you ship code with them, you are the audience.
Is this kit in All-Access?
No. This kit is sold on its own and is deliberately not part of the All-Access bundle.
What if it isn't right for me?
Individual kit purchases carry a 14-day money-back guarantee — email support with your order number and we refund it. The details live in the Terms.