InviteMember roles as array
Hi in the docs it says we can set multiple roles in an invitation:
But when trying to do so I get error:
Types in the intellisense also says it has to be a string:
const response = await authClient.organization.inviteMember({
email: parsedValue.email,
role: parsedValue.roles, // Has to be string
})
2 Replies
bump
this has been fixed in 1.2.4 https://github.com/better-auth/better-auth/pull/1792
GitHub
fix(organization): Fix multiple role array not referenced properly ...
Added ability to pass multiple roles as array to addMember in addition to string roles
Changed role type to InferRolesFromOption<O> | InferRolesFromOption<O>[] to stop t...