mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 14:28:00 +01:00
Step D6 of ADR-0009. Every recovery path ran through the inbox: lose it and the account was gone. Now: - Settings → Security → "Ways to sign in": every identity at the auth server (email, and each linked provider) with when it was last used, a "Link Google / GitHub / …" button for each working provider not yet linked, and remove — refused BEFORE the click, with the reason, while it would leave no way in (email is kept while a passkey is the only other way, since a passkey cannot recover a lost device). One way in shows a warning that says what to do about it. - /auth/cant-get-email, linked from "Forgot password?" and from the reset form: a linked provider, a passkey (when switched on), the inbox's own recovery, and support with what to say. Each is a real way in that exists today; the last one is a person. - lib/auth/sign-in-methods.ts holds the rules, pure and tested; the identities service wraps getUserIdentities / linkIdentity / unlinkIdentity and returns to Settings through the same callback the sign-in flow uses. - docs/operations/account-recovery.md: the one switch this needs on the box (GOTRUE_SECURITY_MANUAL_LINKING_ENABLED — until it is set, "Link" reports that it is not switched on yet), and why first-factor backup codes are deliberately not built. Verified: verify green (4027 tests); the card rendered against a real account at 1280 and 390 with no overflow; /auth/cant-get-email and the forgot form at both widths. Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 Co-authored-by: Claude <noreply@anthropic.com>