Repository navigation
feat(api): let people delete their own account - #703
Conversation
DELETE /api/auth/account takes the current password and anonymizes the signed-in account. The row stays so shared history keeps its author, but the email, name, password, home location and pictures are cleared. - Revoke sessions, destroy API keys, release upcoming spots - Leave groups; archive owned groups after cancelling their upcoming huddlz - Deleted accounts receive no notifications
Adds users.deleted_at, which the account deletion action sets.
|
No fix exists on Generated by Claude Code |
The host holds one seat, so the huddl needs room for two, and only people who RSVPd can see who else went.
…eletion; add rate limit
…hived owned groups
Summary
Evidence
DELETE /api/auth/account404); draft PR leftgroup_invitations.emailintact, leaked names inNotifications.Attribution, left drafts in owned/archived groups, kept adminrole, and returned403instead of429on rate limit.After:
mix format --check-formattedandMIX_ENV=test mix ash.codegen --checkpass locally; full Cucumber (account_deletion.feature: deletion, spots, archived groups, drafts in active & archived groups, invitations, notifications, admin role reset, email re-registration, wrong/missing password) andAuthRateLimitControllerTest(429+Retry-After) running in CI.Merge Danger
Door: one-way
Adds a database migration (
deleted_atcolumn onusers) and a destructive user-initiated anonymization action. Reverting code is easy, but once a real user deletes their account the anonymization cannot be undone.Blast Radius: medium
Touches
User,AuthController,Notifications.Attribution,SuspensionEvents,GroupInvitation, andNotification. Existing active accounts are unaffected unless they invokeDELETE /api/auth/account.