Auth for Vibe Coders: Use a Provider, Do Not Roll Your Own
Use a hosted auth provider like Supabase Auth or Clerk, not code your AI wrote. What a provider covers, and the three auth bugs it still leaves to you.
Row level security, public tables, keys, backups and migrations for apps built on Supabase, including apps made with Lovable and Bolt.
Use a hosted auth provider like Supabase Auth or Clerk, not code your AI wrote. What a provider covers, and the three auth bugs it still leaves to you.
An index lets the database jump to rows instead of reading every one. How to see a missing index, which columns need one, and a test that fails without it.
A migration is a saved SQL file that changes your database. How to change a live table without losing or inventing data, with a test that catches both.
A 20-minute security check for your AI-built app: ask your database for data you should not get, hunt keys in shipped code, play burglar with two accounts.
Your frontend is a public document. Five places API keys leak out of AI-built apps, how to check each, and how to rotate without locking yourself out.
An N+1 query asks the database for a list, then again for every row on it. How to spot it in your browser, fix it in one query, and dodge three traps.
Count queries instead of timing them. A two-test setup that fails when an AI rewrite brings back an N+1 loop, or quietly drops rows while fixing it.
Six things a password reset must do, from identical answers to single-use links, with an eight-test file you can run against what your AI tool wrote.
Revoke-first locks out your own app. The safe order is fix the leak, create a new key, deploy it, then retire the old one. With a test that proves the order.
Your Supabase publishable key is public by design, so row level security decides what it can touch. What RLS is, a first policy, and how to prove it.
A session is a ticket your server looks up. A JWT is a signed note it reads. Which to pick, why logout is the real difference, and what to check in your app.
Supabase ships a live API over your public schema, and new tables often start reachable. The two-minute check, the fix, and a test that keeps it fixed.
A pgTAP suite that fails when strangers can read or write your Supabase tables. Run it before launch, and after every policy change.
How to read logs when your app breaks, add the three fields that make them useful, keep secrets out, and why Vercel's free plan keeps only one hour of them.
Stuck with a vibe-coded app? I'll fix it.
Email me