Issue 1353
enhancement: Disconnect Google from your account
Back to our planOpen
enhancementfrontendauthpriority: high
Problem
A neighbor can connect Google to their account (#1338), but nothing can take it off. The Google id is server-only, so even an admin cannot clear it. If someone with a stolen password connects their own Google, that login survives a password reset, and the note we send only says to change the password and tell us.
Proposed fix
- Neighbor: a "Disconnect Google" button on the Google card of
/account, allowed with a recent sign-in (the same rule as connecting,isRecentSignIn, checked when it is asked and again when it is done). It clears the Google id in one conditional write and sends a short note with the time and no link. - Admins and ops: a supported way to clear an account's Google id when a neighbor writes in (an admin-only action or a reviewed script), logged without personal data.
- Reset and lockout: decide whether a password reset should also end the Google link for an account that was never meant to have one (for example, ask at reset, or clear it only through the admin way), and what a neighbor who has lost both the password and the Google account does. Record the decision on this issue.
- Update the connected-email wording, the accounts note, decision 0020 and
security.mdin the same PR.
Existing work compared
- Searched open and closed issues for "disconnect google", "unlink google" and "log in again": nothing covers removing a Google link.
- #1338 (connect Google) is the parent work and deliberately left removal out; #1316 manages passkeys on the same page and is the pattern for a list-and-remove card.
- Native: Payload has no account linking, so nothing to reuse. Our code: the conditional write and recent sign-in rule from #1338.
Acceptance criteria
- Not done: A neighbor with a recent sign-in can disconnect Google from
/account; an old sign-in shows "Log in again". - Not done: Disconnecting clears the Google id only while it is set, in one conditional write, and the Google button then no longer signs in to that account.
- Not done: A note with the time and no link goes to the account's address.
- Not done: An admin or ops can clear an account's Google id, with a test, and it logs no personal data.
- Not done: The reset and lockout question is decided and recorded here.
- Not done: Tests first, with axe on the card; the accounts note, decision 0020 and
security.mdupdated.
Files likely touched
src/modules/accounts/domain/,use-cases/,data/socialAccounts.ts,ui/ConnectGoogle.tsx,actions.tssrc/modules/accounts/README.md,docs/architecture/decisions/0020-social-sign-in.md,docs/guidelines/security.md
Must not touch
Password sign-in, sign-up, passkeys, and the rule that Google never links by email alone.
Area
auth, frontend
Priority
high
Generated by Claude Code, opens in a new tab