feat(account): add self-serve account deletion #84
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/account-deletion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a Danger zone on the settings page and a POST /settings/delete-account handler that wipes the signed-in user from auth.db and chat.db, removes the avatar file and push subscriptions, clears the session cookie, and broadcasts UserBanned so other connected clients drop the user.
Confirmation requires typing "delete my account"; standalone additionally requires the current password. The handler refuses if the caller is the sole owner of an enclave with other members so the unique partial owner index never traps a member without an owner; an enclave the caller alone owns is removed along with their account.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com