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!
GitHub
better-auth/packages/better-auth/src/plugins/organization/organizat...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
Organization | Better Auth
The organization plugin allows you to manage your organization's members and teams.
0 Replies