Registration has a non-atomic failure mode — user lockout risk #12

Open
opened 2026-02-27 21:18:31 -05:00 by toph · 0 comments
Owner

src/lib/remote/auth.remote.ts:99-109

Creates user with random UUID password, then calls requestOTP.
If OTP delivery fails, the account exists but user has no way in.
Retrying register fails with "email already exists.
Fix: delete the user if OTP fails, or catch "already exists" and fall through to requestOTP

src/lib/remote/auth.remote.ts:99-109 Creates user with random UUID password, then calls requestOTP. If OTP delivery fails, the account exists but user has no way in. Retrying register fails with "email already exists. Fix: delete the user if OTP fails, or catch "already exists" and fall through to requestOTP
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/spellbinder#12
No description provided.