Multiple usage of same plugin?

Is it possible to use the organization() plugin multiple times?

My use case:
Centralized login for multiple different portals using better-auth: user (mobile app), business (web app), enterprise (web app).

logins are all centralized in 1 better-auth db, and we use middleware with extra custom field to check if user has access to user, or business, or enterprise, or all.

i would like for business accounts to be able to create their own organizations, but i would also like for enterprise accounts to be able to create their own organizations, with different roles and without conflict to each other. is that possible? I assume i would need to use the organization() plugin twice so i have 2 instances? or should i do my own custom organization solution instead.

thank you
Solution
Maybe add extend the field for organisation table to have a field for type like enterprise, standard and then add some extra logic to check what the org type is
Was this page helpful?