Sign-in and accounts
Check every page and API route is protected
Pages are hidden in the menu, but anyone with the URL can still call them.
- What you get
- A table of every route that touches user data, who may use it, and where that is enforced.
- Paste it into
- Your AI tool, in your project
The prompt
Audit who can reach what in this project. List everything that reads or writes user data or secrets: pages, API routes, server actions, scheduled jobs, and any database call made straight from the browser. Skip plain content pages. For each, say who should be allowed (anyone, any signed-in user, the owner of the data, an admin, or a job with a secret) and point to what enforces it on the server or in the database rules. Hiding a button or redirecting in the browser doesn't count. Give me a table: route, who's allowed, the file and line of the check, and OK or problem. Flag checks that are missing, happen only in the browser, or trust an ID or role sent by the client. If everything holds, say so. Don't invent findings. Show me the table and wait for my OK before changing any sign-in or permission code. After a fix, prove it with requests made as a signed-out visitor and as the wrong user, on a local or test setup with throwaway accounts. Never test against production, and never send a request that emails or deletes.
Use it
Open your AI tool (Claude Code, Codex or Cursor) in your project folder and paste it in.
More in Sign-in and accounts
Add Google sign-in without breaking existing accounts
Social login looks like one button and turns into consent screens, callback URLs and duplicate users.
Test password reset and email verification end to end
The happy sign-up works, and the reset link is broken, expired or reusable.
Stop users getting logged out at random
People are signed out mid-task, or stay signed in forever on a shared computer.
Make sure admin powers are checked on the server
The admin page is hidden from normal users, and the role is read from something the browser controls.