Skip to content

fix(auth): preserve the existing Boop account on email login - #235

Merged
brianorwhatever merged 1 commit into
mainfrom
codex/fix-stable-login-account
Sep 9, 2026
Merged

fix(auth): preserve the existing Boop account on email login#235
brianorwhatever merged 1 commit into
mainfrom
codex/fix-stable-login-account

Conversation

@brianorwhatever

Copy link
Copy Markdown
Contributor

Summary

Email login now returns users to their existing Boop account when the same email has identities in other apps sharing the Turnkey parent organization. Previously, Boop selected the first global Turnkey email match and created a new local account when that identity differed, making the original lists disappear from view.

Returning users use Boop's saved account link; new users receive a separate identity. Existing duplicate records require an explicit operator selection instead of an arbitrary choice. Pending OTP sessions and user upserts recheck that selection, and conflicting signup sessions cannot insert another user for the same exact email. An undefined DID no longer matches another unfinished signup.

Rollout

Deploy the backend, then use the internal auth:selectLoginAccount operation to select the verified original user for each affected email. The operation preserves every user, DID, list, and Turnkey identity. Affected users must sign out and request a fresh OTP; existing JWTs are not revoked. Until selection, duplicate emails receive an account-recovery error.

The recovery runbook includes the operator commands and verification steps. This PR does not change production data or merge the duplicate accounts.

Validation

  • Added 11 regression tests using the real Convex handlers and Turnkey signing with a mocked network. The initial nine failed against main, including selection of a foreign identity and duplicate user creation.
  • Full suite: 187 passed, 0 failed.
  • Backend and frontend TypeScript checks, changed-file ESLint, and the Vite production build passed.
  • No live OTPs or production writes were used for testing.

@railway-app
railway-app Bot temporarily deployed to Friends / boop-pr-235 September 9, 2026 05:48 Destroyed
@railway-app

railway-app Bot commented Sep 9, 2026

Copy link
Copy Markdown

🚅 Deployed to the boop-pr-235 environment in Friends

Service Status Web Updated
boop ✅ Success (View Logs) Web Sep 9, 2026 at 5:50 am UTC

@brianorwhatever
brianorwhatever merged commit 024144f into main Sep 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant