Nicky Dicky
Nicky Dicky
BABetter Auth
Created by Nicky Dicky on 2/20/2025 in #help
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
7 replies