8000 feat(api): let people delete their own account by mwoods79 · Pull Request #703 · huddlz-hq/huddlz · GitHub
[go: up one dir, main page]

Skip to content

feat(api): let people delete their own account - #703

Draft
mwoods79 wants to merge 3 commits into
mainfrom
claude/project-thread-lq551j
Draft

mwoods79 wants to merge 3 commits into
mainfrom
claude/project-thread-lq551j

Conversation

@mwoods79
@mwoods79 mwoods79 commented Nov 9, 2026
Copy link
Copy Markdown
Contributor

Requested by Micah · project thread

Adds DELETE /api/auth/account so the iOS app can offer in-app account deletion, which App Store review requires. The request carries the bearer token and {"password": "..."}; it answers 204, or 422 when the password is wrong.

Deletion anonymizes the row instead of removing it, because groups, huddlz, memberships and RSVPs require their user. After deletion:

  • The email becomes an unreachable placeholder, so the address can register again. The name reads "Deleted member", and the password, home location, pending email change, preferences and profile pictures are cleared. deleted_at is set.
  • Sessions are revoked and API keys destroyed.
  • Upcoming RSVP and waitlist spots are released, and the waitlist moves up as usual.
  • The person leaves groups they do not own.
  • Groups they own are archived. Archiving requires no upcoming huddlz, so those are cancelled first and attendees get the usual cancellation notice.
  • A deleted account receives no notifications.

Worth a reviewer's eye:

  • This was written without a local Elixir toolchain, so nothing was compiled or run before CI. The migration and the users snapshot were written by hand; the snapshot's hash is carried over from the previous one, so mix ash.codegen --check may ask for a regenerated snapshot.
  • Admins cannot delete someone else's account through this action; only the person can, with their password.
  • The person's notifications, active days and audit versions are kept. Draft huddlz in owned groups are left as they are.
  • There is no web UI for this yet.

Generated by Claude Code

8000
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.
@mwoods79 mwoods79 self-assigned this Nov 9, 2026
mwoods79 commented Nov 9, 2026
Copy link
Copy Markdown
Contributor Author

dependency-audit / Audit Hex dependencies is failing, and it is not caused by this PR.

mix hex.audit now reports a new advisory on ash_ai 1.5.0: EEF-CVE-2026-119613 (GHSA-vhmw-fwrr-r6c6, medium), "AshAi sends unrecognized tool errors verbatim to MCP clients and the model". This PR does not touch mix.exs or mix.lock, and the lockfile matches main, whose last scheduled audit on Nov 8 passed before the advisory was published. The next scheduled audit on main should fail the same way.

No fix exists on main yet. The likely patch is bumping ash_ai past 1.5.0 in mix.lock (mix deps.update ash_ai) in its own dependency PR, or adding the advisory to the audit ignore list if no patched release is out. I can't resolve Hex packages from my environment, so I have not ported it here. Once it lands on main I will merge main into this branch.


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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0