The Prompt BakeryTemplates and prompts

Fix · Security mistakes

My admin page can be opened without logging in

UrgentSecurity

What you may see

  • /admin or a dashboard opens for anyone with the link
  • The login only hides the buttons, but the data still loads

Most likely cause

Hiding a page or a button is not protection; the server must check who is asking on every admin page and every action.

Check first (about two minutes)

  1. Open an admin address in a private window while logged out: do you see the page or data?
  2. Try an admin action address directly while logged out (using a safe test record).

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. List every admin page and every admin action (create, change, delete, export) and which check protects each on the SERVER.
  2. Add a server-side check for a signed-in user with the right role on all of them (pages, API routes and server actions), refusing everything else.
  3. Make the database rules (row level security) match, so a stolen link or key still cannot read private data.
  4. Write tests that call each admin address logged out and as a normal user and expect a refusal.

Do not do this

  • Do not use a secret address as protection.
  • Do not remove the admin features to fix this.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.