Supabase security
Guides
How to test Row Level Security on a vibe-coded Supabase app, and the policies and keys that decide whether user B can see user A's data.
How to test Supabase RLS with two users
A public URL only shows the anonymous view. Sign in as two users and try to read, update, and delete each other's rows.
Supabase INSERT policies and WITH CHECK
WITH CHECK (true) and logged-in checks let a user create or rewrite rows under someone else's user_id. The fix is auth.uid() = user_id, on insert and on update.
The Supabase service role key does not belong in the browser
The anon key is public and follows RLS. The service_role key and sb_secret keys bypass RLS. How they leak through Vite and Next, how to find one in the built JS, and how to rotate it.
Admin checks in vibe-coded apps
A client-side isAdmin flag, a policy on user_metadata, and an API route with no session all trust the browser. Use app_metadata or a roles table, and reject a missing user.
Launch security checklist for Lovable and Bolt
Ten checks before you share a Lovable or Bolt app that stores data in Supabase. RLS, two users, insert policies, leaked keys, and admin routes.