Remainder of #18160. Today core/verify.ts (sign-in email proof) and core/identities.ts (connections) each keep a proof of an email. Make one the reader of the other so no second place says who someone is.
Done when: a test proves an email once and both the sign-in gate and the connections list show it proven; removing the connection does not leave a stale sign-in proof.
Files: src/core/verify.ts, src/core/identities.ts, test/verify.test.ts, test/identities.test.ts.
Risks: locking people out of sign-in; keep the existing sign-in tests green.
Suggested: scout.
Reviewed pull #18320 at its head: ticked Read how verify.ts emailVerified and identities' proven rows relate; the account's proven email is answered from one of them, the other calls it.; What it replaces goes in the same pull; verify.ts's tests stay green..
Remainder of #18160. Today core/verify.ts (sign-in email proof) and core/identities.ts (connections) each keep a proof of an email. Make one the reader of the other so no second place says who someone is.
Done when: a test proves an email once and both the sign-in gate and the connections list show it proven; removing the connection does not leave a stale sign-in proof.
Files: src/core/verify.ts, src/core/identities.ts, test/verify.test.ts, test/identities.test.ts. Risks: locking people out of sign-in; keep the existing sign-in tests green. Suggested: scout.