[GH-ISSUE #1028] Multiple Roles on Organization Member #17188

Closed
opened 2026-04-15 15:12:37 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @albinjon on GitHub (Dec 26, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1028

Is this suited for github?

  • Yes, this is suited for github

For my use-case, I need organization support, which I have in Auth0 and now also in Better Auth, very happy about that. But for members of these organizations, I need to have roles. This is possible, but unfortunately limited in an important sense. In Auth0 I can have multiple roles per member, say this person is the "project manager but also the accountant" (just an example). This is not possible right now with the organization plugin, where one member can only have a singular role. I'm using this extensively, and would require it in order to fully move to Better Auth.

Describe the solution you'd like

I'd like the option of having multiple roles per member in organizations.

Describe alternatives you've considered

Customizing the member in the betterAuth() call, unfortunately it's not supported in the same way as user is ("additionalFields").

Customizing the member schema directly, as recommended in discord. But this is unfortunately not a perfect solution since it seems like this would become quite problematic since that custom property won't be included in the BetterAuth built-in calls. Doing this seems like a ticking timebomb since I'm not a solo-developer on this project.

Considered a kind of merge in the role name, like having it more like "owner:member:etc" but this won't scale and I've got quite a lot of roles, where I'd need all possible combinations... Not feasible.

Additional context

No response

Originally created by @albinjon on GitHub (Dec 26, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1028 ### Is this suited for github? - [X] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. For my use-case, I need organization support, which I have in Auth0 and now also in Better Auth, very happy about that. But for members of these organizations, I need to have roles. This is possible, but unfortunately limited in an important sense. In Auth0 I can have multiple roles per member, say this person is the "project manager but also the accountant" (just an example). This is not possible right now with the organization plugin, where one member can only have a singular role. I'm using this extensively, and would require it in order to fully move to Better Auth. ### Describe the solution you'd like I'd like the option of having multiple roles per member in organizations. ### Describe alternatives you've considered Customizing the member in the betterAuth() call, unfortunately it's not supported in the same way as user is ("additionalFields"). Customizing the member schema directly, as recommended in discord. But this is unfortunately not a perfect solution since it seems like this would become quite problematic since that custom property won't be included in the BetterAuth built-in calls. Doing this seems like a ticking timebomb since I'm not a solo-developer on this project. Considered a kind of merge in the role name, like having it more like "owner:member:etc" but this won't scale and I've got quite a lot of roles, where I'd need all possible combinations... Not feasible. ### Additional context _No response_
GiteaMirror added the lockedenhancement labels 2026-04-15 15:12:37 -05:00
Author
Owner

@albinjon commented on GitHub (Dec 26, 2024):

Since it's not relevant to the feature request, I wanted to add here instead: thank you for this framework. It's a joy to work with and it smells of quality.

<!-- gh-comment-id:2563025615 --> @albinjon commented on GitHub (Dec 26, 2024): Since it's not relevant to the feature request, I wanted to add here instead: thank you for this framework. It's a joy to work with and it smells of quality.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#17188