T23: account page (disconnect everything, hard delete) #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t23-account"
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?
T23: Account (disconnect everything / hard delete)
Stacked on #21 (
t22-calendar) → … → #1. Merge those first.What
/account(en/cs): profile (name, FIT username, e-mail) and a danger zone with two forms. Each requires typing your FIT username, a session, and a same-originOrigin.usersrow (sessions, accounts and connections cascade), clears the session cookies (plain and__Secure-), and redirects to/?deleted=truewith a confirmation banner.revokeAllUserGrantsrevokes until nothing is left (there's no page cap). If grants can't all be revoked, deletion aborts and the account is kept, so you can retry. Nothing is half-deleted./authorizere-checks aftercompleteAuthorizationthat the user still exists, and undoes the grant if not;/account, and an always-visible Account nav item covers mobile.getwith[]. Drizzle turns that into a truthy all-undefined object, sofindFirst"found" missing rows. It now returnsundefined, like D1. All 259 tests still pass, so nothing else depended on it.Verified
bun run lint && bun run typecheck && bun run test: 259 tests, 8 of them new./accountrenders with both forms; a wrong confirmation →?status=confirm_mismatch; cross-origin → 403. Your local data was verified intact afterwards./?deleted=trueshows the banner, and/mcpwithout a token → 401.?deleted=1triggered a TanStack search-canonicalisation 307, so it now uses?deleted=true.Astra review (gpt-6-astra), 2 rounds
Fixed:
Round 2 found no further backend defects.
🤖 Generated with Claude Code