m0dded
BABetter Auth
•Created by m0dded on 5/14/2025 in #bug-reports
Organization Member Role | Wrong Type
When using Organization Plugin:
As per this: https://www.better-auth.com/docs/plugins/organization#update-member-role
it says it can support an array for multiple roles
however Member Table: https://www.better-auth.com/docs/plugins/organization#member
shows role as string - shouldn't this be string[] ?
Checking the source code: https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/plugins/organization/organization.ts
Schema Definition:
Flattening is happening here:
this would mean for true support of multiple roles in updateMemberRole we would need to split the string, mutate and join it again and send back?
This could lead to serious bug/risk? Hoping you guys can fix this please!
2 replies