[GH-ISSUE #5382] [admin plugin] support for userRoles like adminRoles #27550

Closed
opened 2026-04-17 18:37:32 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @onhate on GitHub (Oct 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/5382

Is this suited for github?

  • Yes, this is suited for github

No response

Describe the solution you'd like

Now there's only support for one type of non admin role, user and all signups even if sending role property are overwritten to user.

But adminRoles is supported by the application.

Describe alternatives you've considered

Similar to adminRoles the system should support userRoles so I can have custom user roles like patient and doctor that do not represent admin roles.

Additional context

No response

Originally created by @onhate on GitHub (Oct 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/5382 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like Now there's only support for one type of non admin role, `user` and all signups even if sending role property are overwritten to `user`. But `adminRoles` is supported by the application. ### Describe alternatives you've considered Similar to `adminRoles` the system should support `userRoles` so I can have custom user roles like `patient` and `doctor` that do not represent `admin` roles. ### Additional context _No response_
GiteaMirror added the lockedenhancement labels 2026-04-17 18:37:32 -05:00
Author
Owner

@bytaesu commented on GitHub (Oct 17, 2025):

Hi @onhate,

I think there might be some confusion between the admin plugin and the organization plugin.

Admin Plugin vs Organization Plugin

Admin Plugin: Managing the app itself (Admin of your app)

Organization Plugin: User roles within the app (Admin for your app)

Your Use Case

Based on your description, you want to assign business roles like patient and doctor to users. This is exactly what the organization plugin is designed for, not the admin plugin.

The admin plugin's role field is specifically for distinguishing between app administrators (who can manage the user pool) and regular app users. It's not meant for application-specific business roles.

For your use case with patient and doctor roles, please check out the Organization Plugin documentation.

Hope this clarifies things!

Note

This may differ from the Better Auth team’s stance.

<!-- gh-comment-id:3416408991 --> @bytaesu commented on GitHub (Oct 17, 2025): Hi @onhate, I think there might be some confusion between the **admin plugin** and the **organization plugin**. ## Admin Plugin vs Organization Plugin **Admin Plugin**: Managing the app itself (Admin **of** your app) **Organization Plugin**: User roles within the app (Admin **for** your app) ## Your Use Case Based on your description, you want to assign business roles like `patient` and `doctor` to users. This is exactly what the **organization plugin** is designed for, not the admin plugin. The admin plugin's `role` field is specifically for distinguishing between app administrators (who can manage the user pool) and regular app users. It's not meant for application-specific business roles. For your use case with `patient` and `doctor` roles, please check out the [Organization Plugin documentation](https://www.better-auth.com/docs/plugins/organization). Hope this clarifies things! > [!NOTE] > This may differ from the Better Auth team’s stance.
Author
Owner

@onhate commented on GitHub (Oct 17, 2025):

I don't have the concept of organizations, it's a single platform for all users, but after reading the admin plugin code I realized what you mean and I ended up adding an additional type to the users named userKind so all role=user need a userKind set.

thanks for the time to provide the feedback @bytaesu

<!-- gh-comment-id:3416559766 --> @onhate commented on GitHub (Oct 17, 2025): I don't have the concept of organizations, it's a single platform for all users, but after reading the admin plugin code I realized what you mean and I ended up adding an additional type to the users named userKind so all role=user need a userKind set. thanks for the time to provide the feedback @bytaesu
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#27550