[GH-ISSUE #228] Can't remove user using authClient.admin.removeUser on Prisma #8179

Closed
opened 2026-04-13 03:16:49 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @kikiimdev on GitHub (Oct 18, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/228

Describe the bug
Can't remove user with admin plugin, its running prisma create function instead of delete function.

To Reproduce
Steps to reproduce the behavior:

  1. Use prisma adapter
  2. Use admin plugin
  3. Create user with admin role
  4. Login with admin user
  5. Create new user with user role
  6. Delete the newly created user
  7. See error

Expected behavior
It should remove the user, prisma should run delete function.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Vivaldi
  • Bun
Originally created by @kikiimdev on GitHub (Oct 18, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/228 **Describe the bug** Can't remove user with admin plugin, its running prisma create function instead of delete function. **To Reproduce** Steps to reproduce the behavior: 1. Use prisma adapter 2. Use admin plugin 3. Create user with admin role 4. Login with admin user 5. Create new user with user role 6. Delete the newly created user 7. See error **Expected behavior** It should remove the user, prisma should run delete function. **Screenshots** <img width="1138" alt="image" src="https://github.com/user-attachments/assets/054c25eb-2cc8-41c1-89cc-2bf8b922daf2"> **Desktop (please complete the following information):** - OS: MacOS - Browser: Vivaldi - Bun
GiteaMirror added the locked label 2026-04-13 03:16:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8179