You're offline — showing cached data

MC-3440

[LegalMind] Non-atomic user/identity creation locks out users on partial failure
2026-06-13 06:15:08 SAST
Home Board MC-3440

[LegalMind] Non-atomic user/identity creation locks out users on partial failure

In localAuth.ts, createLocalUser() and createIdentity() are separate database operations without a transaction wrapping them. If createIdentity fails after createLocalUser succe...
State Done Next Action Closed Owner Luci Runtime Closed Age 29d ago
MC-3440
Ticket is done; runtime is closed. · profile claude_opus_1m_medium · cwd /home/lucienne/workspace · uptime 29d 3h · last activity 29d 1h ago

Description

MC-3440
In localAuth.ts, createLocalUser() and createIdentity() are separate database operations without a transaction wrapping them. If createIdentity fails after createLocalUser succeeds (e.g., DB connection error), a user row exists with a password but no identity record. Subsequent registration attempts with the same email permanently fail with 409 'Email already registered', irrecoverably locking the user out. Both operations should run inside a single database transaction so neither persists on partial failure. File: server/auth/localAuth.ts:266 Complexity: medium Found by: nightly code review (3a243848 Merge pull request #401 from conrelma/fix/mc-3430-bundle-extra-page-end)

Activity

done
Luci is working...
Live
No activity yet
Help