Skip to content

add a settings page with delete account - #108

Merged
hkonsti merged 3 commits into
mainfrom
hkonsti/delete-account
Oct 15, 2026
Merged

hkonsti merged 3 commits into
mainfrom
hkonsti/delete-account

Conversation

@hkonsti

@hkonsti hkonsti commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

A Settings page (gear in the sidebar footer, /settings) showing the account's email and name, with Delete account.

Deleting asks for the account's email address typed again, then calls DELETE /api/me, which:

  1. undoes every connection of the organization at its provider, through the same beforeDisconnect that disconnecting one uses (Google's grant is revoked today; a bank's login will be removed at Plaid once the Plaid integration lands on top of this, with no change here);
  2. deletes the user and their organization (deleteUser), whose cascades take connections and their credentials, Information, agents and their logins, MCP clients, the activity log and sessions; it now also deletes sign-in links still waiting for the address;
  3. clears the session cookie, and the page reloads onto /login.

A provider that can't be reached is logged and doesn't stop the deletion, as when disconnecting.

The privacy policy and terms now say an account can be deleted in Settings as well as by email, and the legal pages' effective date moves to October 15, 2026.

Why

The Data Retention and Disposal Policy for Plaid's review promises that deleting an account removes its bank logins at Plaid first. Until now deletion was manual, and deleting the user directly would have left connections active at their providers.

Tested

  • DELETE /api/me tests: order (connections undone, then the user), a failed deletion keeps the session, a user without an organization.
  • Dialog tests: only deletes once the address is typed, shows errors.
  • End to end in the dev app: signed in, made an agent and a note, deleted the account from Settings; landed on /login, /api/me answers 401, no session cookie left.
  • bun run typecheck, bun run test, bun run lint, website build.

Deleting an account undoes each connection at its provider first, as disconnecting does,
then deletes the user and their organization with everything in it, and signs out. The
dialog asks for the account's address before it deletes anything.
@hkonsti
hkonsti force-pushed the hkonsti/delete-account branch from e71ac98 to 2708fc4 Compare October 15, 2026 20:11
@hkonsti
hkonsti merged commit d2c9143 into main Oct 15, 2026
2 checks passed
@hkonsti
hkonsti deleted the hkonsti/delete-account branch October 15, 2026 20:34
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