By the end of this lesson you will know why hiding a button protects nothing, how server checks and database rules (RLS) keep each user's data private, and how to make your agent audit your app's logins.
You need: an app with user logins (for example on Supabase), two test accounts and your coding agent · Time: 8 minutes
Imagine a shop with a "Staff only" sign on a door that has no lock. Honest customers stay out. Anyone else walks in.
Hiding a button in your app is that sign. The "Admin" link is hidden for normal users, the "Download report" button only shows for paid users, but the page and the data behind it still answer anyone who asks directly. A user can open the browser's developer tools, change the page, or send the request themselves. That is how people skipped Enrichlead's paywall: by editing the page in their own browser.
Why?The browser belongs to the user. Anything the browser decides, the user can change. Real decisions must happen where the user cannot reach: on the server or inside the database.
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Check on the server, every time
- Every user sees only their own data
- Supabase RLS in plain words
- Admin pages
- Ask your agent to audit your logins
- Recap