Files
accountkit/test
CatoandClaude afed1f433c feat(auth): onAccountCreated for every new person, and onAccountDeleted (#58)
A first email sign-in link creates the person without a sign-in method, so
onAccountCreated (which ran as a method was attached) never ran for them and
a product had no row for that person. A user create hook now reports such a
person once, as soon as they exist, with providerId NO_SIGN_IN_METHOD; a
person who already has a method was reported as it was attached, so the hook
reaches every new person exactly once.

onAccountDeleted({ userId, email }) runs once a person's account is deleted,
so a product removes or anonymises its own row. A product's refusal before
/delete-user still stops the deletion before anything is deleted, and the
hook is not called then.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 08:49:16 +01:00
..