Skip to content

feat(hub): add delete account cascade from Settings - #13

Merged
Tam-Leal merged 1 commit into
mainfrom
feat/hub-delete-account
Jul 29, 2026
Merged

feat(hub): add delete account cascade from Settings#13
Tam-Leal merged 1 commit into
mainfrom
feat/hub-delete-account

Conversation

@Tam-Leal

Copy link
Copy Markdown
Contributor

Summary

  • Add DELETE /api/auth/account with CSRF and email confirmation; cascade-delete snapshots, machines, API keys, audit rows, and the user.
  • Invalidate all Hub sessions and clear cookies after deletion.
  • Settings danger zone UI: type account email to enable delete; Pro users see billing cancel guidance (Lemon / support).

Test plan

  • Settings shows danger zone; delete button stays disabled until email matches
  • Wrong email → 400; missing CSRF → 403
  • Successful delete logs out and login with same credentials fails
  • After delete, keys/machines/snapshots for that user are gone from Hub DB
  • Pro copy warns that Lemon subscription is not auto-cancelled
  • Existing revoke key / remove machine flows still work

Allow users to permanently delete Hub account data (keys, machines, snapshots) with email confirmation and CSRF, matching the Privacy Policy claim.
@Tam-Leal
Tam-Leal merged commit a64263b into main Jul 29, 2026
1 check passed
@Tam-Leal
Tam-Leal deleted the feat/hub-delete-account branch July 29, 2026 22:47
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.

1 participant