Allow user to leave an organization. #571

Closed
opened 2026-03-13 07:53:27 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Kazizodev on GitHub (Jan 18, 2025).

Is this suited for github?

  • Yes, this is suited for github

I want the members and admins to be able to leave an organization if they wanted to. Currently the only way to do that is for the admin or owner to remove them manually.

Describe the solution you'd like

I think adding organization.leave() is the best option, and I personally think it completes the members feature in the organization plugin.

This function will allow anyone to leave the organizations except owner since they need to delete the organization or promote someone else to be owner instead of leaving it.

Describe alternatives you've considered

I tried using the organization.removeMember(), however it is exclusive for admin and owner roles.

The only alternative is to do a manual API hitting the database and deleting the member from the table.

Additional context

No response

Originally created by @Kazizodev on GitHub (Jan 18, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I want the `members` and `admins` to be able to leave an organization if they wanted to. Currently the only way to do that is for the `admin` or `owner` to remove them manually. ### Describe the solution you'd like I think adding `organization.leave()` is the best option, and I personally think it completes the members feature in the organization plugin. This function will allow anyone to leave the organizations except `owner` since they need to delete the organization or promote someone else to be `owner` instead of leaving it. ### Describe alternatives you've considered I tried using the `organization.removeMember()`, however it is exclusive for `admin` and `owner` roles. The only alternative is to do a manual API hitting the database and deleting the member from the table. ### Additional context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#571