From eb2ac60c730236e2c0a2eed194f0c7d77197e79b Mon Sep 17 00:00:00 2001 From: Morgan Roderick Date: Fri, 7 Aug 2026 16:19:22 +0200 Subject: [PATCH] feat: override user info on GitHub sign-in to self-heal stale emails --- src/auth.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/auth.js b/src/auth.js index 1059046..7c0beb8 100644 --- a/src/auth.js +++ b/src/auth.js @@ -39,6 +39,11 @@ export const auth = betterAuth({ // Resolve the account email from /user/emails (primary + verified) so // returning GitHub users match their existing planner accounts. getUserInfo: getGithubUserInfo, + // Re-derive the stored email from the provider on every sign-in so users + // who linked BEFORE getUserInfo shipped (with their old public-email + // address) self-heal to the primary instead of staying bound to a + // duplicate planner account. + overrideUserInfoOnSignIn: true, }, }, telemetry: {