more control around deleteUser #306

Closed
opened 2026-03-13 07:41:20 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @arfath-linklet on GitHub (Dec 1, 2024).

Is your feature request related to a problem? Please describe.
Client provides a way to deleteUser. There is no guard in order to control this behaviour. We may need configurations for disabling this API.

Example useCases: when user has a subscription with dues, cleanup jobs before and/or after delete

Describe the solution you'd like

  1. hooks for before and after delete
  2. config for disabling delete API entirely
Originally created by @arfath-linklet on GitHub (Dec 1, 2024). **Is your feature request related to a problem? Please describe.** Client provides a way to `deleteUser`. There is no guard in order to control this behaviour. We may need configurations for disabling this API. Example useCases: when user has a subscription with dues, cleanup jobs before and/or after delete **Describe the solution you'd like** 1. hooks for before and after delete 2. config for disabling delete API entirely
GiteaMirror added the enhancement label 2026-03-13 07:41:20 -05:00
Author
Owner

@Bekacru commented on GitHub (Dec 2, 2024):

Hey, you can currently disable it by creating a plugin or checking in your handler if the pathname contains /delete-user. But, we plan to add more configurability around this in 1.1.0. Regarding hooks, we are working on a new API to handle them better, but for now, you can create a plugin to address this as well.

@Bekacru commented on GitHub (Dec 2, 2024): Hey, you can currently disable it by creating a plugin or checking in your handler if the pathname contains `/delete-user`. But, we plan to add more configurability around this in 1.1.0. Regarding hooks, we are working on a new API to handle them better, but for now, you can create a plugin to address this as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#306