Skip to content

fix(auth): preserve accounts after onboarding conflicts - #87

Merged
voltcrash merged 3 commits into
mainfrom
fix/audit-signup-account
Oct 11, 2026
Merged

voltcrash merged 3 commits into
mainfrom
fix/audit-signup-account

Conversation

@voltcrash

@voltcrash voltcrash commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Description

Overlapping username onboarding requests could create an application profile, then delete its authentication identity when the losing insert failed. Username conflicts also revoked sessions before users could retry.

Preserve the authenticated account on onboarding failures. D1 uniqueness still ensures only one profile is inserted; conflicts return 409.

Validation

  • Signup regressions: 2 passed (both failed before the fix).
  • Existing Better Auth/D1 suite: 2 passed.
  • Existing user controller suite: 109 passed; onboarding rejection tests now assert account preservation.
  • Staged formatting and lint/type checks passed.

@voltcrash
voltcrash merged commit 453218c into main Oct 11, 2026
12 checks passed
@voltcrash
voltcrash deleted the fix/audit-signup-account branch October 14, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant