I'm trying to disable setActiveOrganization except in very specific workflows.
Org Admins can impersonate users, and then setActiveOrganization lets them bleed into other programs. I have a VERY hacky workaround that might or might not work, but I would much rather only let the user set an organization at the moment of login, from a server perspective.
I added this https://github.com/better-auth/better-auth/issues/3852 but second-guessed myself that maybe there's another way to do it.
I'm using a custom
imitate()
plugin and not the admin
plugin because I wanted further restrictions on the imitate process.GitHub
setActiveOrganization cannot be disabled. Add allowUserToSetOrgani...
Is this suited for github? Yes, this is suited for github Is your feature request related to a problem? Please describe. Here's my use case. I have a fairly robust tenant imitation system where...
0 Replies