Is there a superadmin role that lets you manage every organization?
hey guys, I'm building an admin portal for my company's project. We need to be able to manage (delete/edit/send invitation) every organization even if the operator is not in that organization. Is it possible in better-auth?
Solution:Jump to solution
https://github.com/better-auth/better-auth/issues/1595
Turned out it isn't available yet. I added a hook on
/oauth2/redirect to automatically add users logged in through our internal IdP to a special organization, then added a server action to directly modify the database if that user is a part of the special organization. ugly but it works 😅...GitHub
Cannot update and delete an organization as user admin (super admin...
Is this suited for github? Yes, this is suited for github Is your feature request related to a problem? Please describe. Hello, Is it possible to delete an organization when a user has the "ad...
4 Replies
i handled this myself by adjusting the users table to have an isSuperAdmin boolean flag and then just handle checks within the app to essentially give them all capabilities
I think you can just use both the admin plugin and the organization plugin
Solution
https://github.com/better-auth/better-auth/issues/1595
Turned out it isn't available yet. I added a hook on
/oauth2/redirect to automatically add users logged in through our internal IdP to a special organization, then added a server action to directly modify the database if that user is a part of the special organization. ugly but it works 😅GitHub
Cannot update and delete an organization as user admin (super admin...
Is this suited for github? Yes, this is suited for github Is your feature request related to a problem? Please describe. Hello, Is it possible to delete an organization when a user has the "ad...
iirc
authClient.admin does not provide any apis related to organizations.