Custom sessions plus Postgres row policies is the risk centre
- Observed
- Admin signs in with a PIN and employees with an admin-created username/password, while reads go through the destination client.
- Why it matters
- If those sessions are not Supabase Auth sessions, auth.uid() is null inside the database. Policies then either block everything — which looks exactly like your blank Report page — or get loosened to `using (true)`, which hands every customer name, phone number and call recording to anyone holding the publishable key.
- The fix
- Pick one: move employee login onto Supabase Auth so auth.uid() is real, or route every lead/report read and write through your own server routes with the secret key and let the anon role see nothing. Do not leave it half-and-half.