Demo Supabase projects often leave tables open and service keys in the client. This checklist turns row rules fail-closed, isolates the service role, splits prod from preview, and proves Auth URLs — before public users arrive. Keep the data model you built. Close the defaults.
Hardening Supabase means row rules deny by default, the service role never ships in the client, preview and prod are different projects, and Auth URLs match the real host. You keep the schema you proved. Public users arrive only after wrong-eye reads fail.
Where vibe Supabase leaks
Open tables feel convenient until strangers show up
Builders enable Auth UI while RLS stays off. Fix rules before ads.
RLS off or policies that allow all
Deny by default. Test cross-tenant.
Service role in the browser bundle
Move server-only. Rotate if exposed.
Same project for preview and prod
Split. Different secrets.
Auth URLs still on localhost
Prod callbacks on the real origin.
The Supabase lock week
Rules → secrets → split → prove
Public users last.
01
Turn RLS on with deny-default policies
Per table. Per tenant key.
02
Quarantine service role to server only
Rotate if it ever touched a client.
03
Create a real prod project
Migrate schema. Fresh secrets.
04
Align Auth URLs and email templates
Prod host only on prod.
How to
How to lock Supabase before public users
Fail closed first.
Step 01
Inventory tables and who should read them
Tenant key named.
Step 02
Enable RLS with deny-default policies
Probe wrong-eye reads.
Step 03
Remove service role from any client path
Rotate exposed keys.
Step 04
Stand a separate prod project
Do not promote the demo project.
Step 05
Fix Auth redirect URLs for prod
Test sign-in on the real host.
Step 06
Backup and migration habit written
Before paid traffic.
Read next
Proof, the essay, and sibling intents
These pages are already on the site. Use them to pressure-test the bet before a call.
“What impressed us most about CodeCross was their ability to deeply understand our vision and translate it into a complete digital solution. Unlike many agencies that just focus on technical delivery, CodeCross approached our project like true partners.”
What does “RLS fail-closed” look like on a vibe Supabase project?
RLS enabled on every user table; policies grant only matching tenant or owner; a second account’s select/update returns empty or deny. Open “allow all” policies are a fail.
Where must the service-role key never appear?
Browser bundles, mobile apps, shared chat logs, and committed env files. Server-only paths only. If it appeared in a client, rotate immediately.
How should Auth URLs and email templates differ in prod?
Prod project lists the real origin and deep links; preview keeps localhost or preview hosts. Mixing them breaks sign-in or leaks users to the wrong project.
What backup and migration habits belong before paid traffic?
Scheduled backups, a proven restore onto a scratch project, and migrations applied forward-only with a named owner. Demo-only dashboards are not a plan.
Deny by default before you invite strangers.
Bring the project ref and where the service role lives today. We fail closed — then invite.