The auth and admin checklist for every client app your coding agent builds
Key takeaways
- Every client app needs five pieces: logins, roles, data separation, an admin screen and a handover plan.
- Put all five on the quote so they're paid work, not favors in week three.
- AI-written auth fails in predictable ways: trusting a user ID from the browser, unchecked list endpoints, homemade password storage.
- Run the handover test before the client sees the app, and again with them.
Your agent can build the app in an afternoon. Then come logins, roles, keeping customers apart, an admin screen and the handover. Here are the five pieces, how to quote them, where AI gets them wrong, and how to check.
The client loves the demo.
Then they ask: "Can my office manager log in? Can she see the invoices but not the payroll? Can I add people myself?"
One builder on Reddit listed what they rebuild on every project: user management, roles and permissions, a settings page. Then:
"It’s not exciting dev work. But it has to be done. Every. Single. Time."
(r/SideProject)
Here's the checklist we use. Five pieces. Every client app needs all of them, whatever you build it with.
The 5 pieces every client app needs
# | Piece | The question it answers | Done when |
|---|---|---|---|
1 | Logins | Who is this person? | They can sign in, reset a password, and get locked out when they leave |
2 | Roles | What are they allowed to do? | The server refuses, not just the button hiding |
3 | Data separation | Whose records can they see? | Customer A can't load Customer B's records by changing a URL |
4 | Admin screen | Who adds and removes people? | The client does it without texting you |
5 | Handover plan | Who owns all this when you're done? | The client holds the accounts. You're a guest |
Put all five on the quote
List the five pieces as line items, with your own hours next to each. A client who sees "Admin screen" on the quote doesn't ask for it free in week three. And "we'll add roles later" becomes a change order, not a favor.
1. Logins
Email and password, a reset link that works, and sign-in with the account they already use. For most offices that's Google or Microsoft.
Check:
- Password reset emails actually arrive (test with a Gmail and an Outlook address).
- A deleted user's session stops working. Not tomorrow. Now.
- Two-factor is available for anyone with admin rights.
Build it or rent it? Most shops rent. Clerk is a hosted login service that charges per user past its free tier. Supabase bundles logins with a hosted database and bills per project. Both work. Both send a monthly bill, so settle who pays it on day one. Tell the client:
"Your login service has its own monthly bill. We'll set it up on your company card, so the account is yours."
2. Roles
"Admin", "staff" and "customer" cover most apps. Write the rules down in a table before anyone writes code:
See invoices | Edit invoices | See payroll | Add users | |
|---|---|---|---|---|
Admin | Yes | Yes | Yes | Yes |
Staff | Yes | Yes | No | No |
Customer | Own only | No | No | No |
Hand that table to your agent. It's the spec.
Check: log in as each role and try the thing they shouldn't do, through the API, not the UI. AI agents love to hide the "Delete" button from staff and leave the delete endpoint open. Hidden buttons are not security.
3. Data separation
If one app serves several of your client's customers, each customer sees only their own records. When this breaks, one customer sees another's invoices, and your client finds out from them.
Check: log in as Customer A. Copy the URL of one of A's records. Log in as Customer B and paste it. You should get "not found", not the record.
4. Admin screen
A page where the client adds a user, changes a role and removes someone who quit. Without it, you become their help desk. Every new hire is a text message to you.
Check: hand the client the admin login during the demo and ask them to add a coworker. If they ask you how, it's not done.
5. Handover plan
Decide who owns the hosting, the domain, the database and the login service before you start. Not at the end.
One r/webdev reply:
"Put the domain, hosting and billing in the client's account from day one, then add yourself as collaborator. Otherwise you become their accidental sysadmin and the handoff gets weird fast."
(r/webdev)
Check: could the client fire you tomorrow and keep running? They need the code, the database, and admin access to every paid account. If any of those live under your email, fix it now. On handover day, remove yourself or drop to collaborator, and tell the client in writing.
Where AI-written auth goes wrong
Coding agents write login code that works in the demo. The trouble is what they skip.
1. Trusting who the browser says you are. A developer who inherited a vibe-coded app found this:
"They're using supabase, they use the client library to pull the userId and email and store it in context. Then, when making a request, they just send that userId or email as a query parameter or in the body of the request."
(r/webdev)
That means anyone can change one number in a request and become another user. The server has to work out who you are from the session, never from something the browser sends.
2. Forgetting the list endpoint. The single-record page checks ownership. The "list all records" endpoint behind the table doesn't. One request and you have everything.
3. Rolling its own password storage. Ask an agent for "simple auth" and you can get passwords stored with a fast hash, or reset links that never expire. Use a library or service for this part. Always.
A reply on r/ClaudeAI said it in nine words:
"just don't let the ai write its own login"
(r/ClaudeAI)
Paste this into your coding agent
Before you write any auth or data code in this app:
- Get the current user from the session on the server.
Never accept a user ID or email from the request.
- Check the user's role on the server in every endpoint,
including list endpoints and exports.
- Filter every query by the records this user may see.
- Use a tested auth library for passwords, sessions and
reset links. Don't write your own.
- Treat this roles table as the spec: [paste your table]The handover test
Run alone, before the client sees it:
- Sign in, sign out, reset the password.
- Delete a user. Confirm their open session dies.
- Log in as each role. Try one forbidden action through the API.
- Log in as Customer B. Open Customer A's record by URL.
- Call every "list" endpoint as the lowest role. Count what comes back.
Run with the client:
- They add a coworker from the admin screen, without your help.
- Go through every paid account together. The client is the owner on each.
If any step fails, it's not ready.
How FrogBot handles this
FrogBot is an open-source TypeScript framework your coding agent builds with. Pieces 1, 2 and 4 come pre-built, so your agent writes the rules instead of the plumbing:
- Logins: email and password, plus sign-in with Google, Microsoft or GitHub, turned on in the users collection config. Two-factor is a plugin.
- Roles: the roles plugin turns the table above into a few lines of config, like
read: allow('finance', { role: 'member', own: 'owner' }), and checks it on the server for every request.own: 'owner'limits a user to records they own, which covers simple data separation too. - Admin screen: every app gets one. The client adds users and changes roles there.
The handover plan is still on you. FrogBot makes it simpler: the code is MIT-licensed and lives in your client's repo. Host it anywhere, or on Dojo for $29 a month per app with no per-user fees.
If you build client apps every month, this is why FrogBot exists. Logins, roles and the client's admin screen are done before your agent writes a line, so this checklist takes an afternoon, not a week.
Start your first app
Paste this into your coding agent to scaffold a production app in minutes, then deploy it to Dojo for $29 a month with $0 per seat.