Sign-in and accounts
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.
- What you get
- Roles stored where users can’t edit them and checked on every admin action.
- Paste it into
- Your AI tool, in your project
The prompt
Check how admin and other roles work in this project. Find where a user's role is stored, who is able to change it, and every place the code decides something based on it. Flag any role that comes from the browser: a field in a request body, a value in local storage, a profile field the user can update themselves, or an unverified token claim. Tell me what you found before changing any permission code. Then move the decision to the server for every admin action, with the role read from a place only the server or an admin can write. Finally, on a local or test setup only, try as a normal test user to make yourself an admin and to call each admin route directly. Show me the attempts and that they fail.
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
Sign-in works locally and fails on the live site
You land back on localhost, hit a redirect error, or stay signed out after logging in.
Check every page and API route is protected
Pages are hidden in the menu, but anyone with the URL can still call them.
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.