P1: fix(auth): offer recovery after OTP lockout - #217
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🦋 Changeset detectedLatest commit: 2e00832 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
🚅 Deployed to the ePDS-pr-217 environment in ePDS
|
Coverage Report for CI Build 30955683423Coverage increased (+0.2%) to 58.124%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
This comment has been minimized.
This comment has been minimized.
16b752a to
525cee0
Compare
|
There needs to be a |
525cee0 to
5bb0c81
Compare
5bb0c81 to
62729b9
Compare
62729b9 to
66a7cf9
Compare
|
(reply generated by OpenAI Codex) Addressed the punctuation feedback in 66a7cf9. Inline actions now add a period when the error text lacks terminal punctuation, and the browser step asserts the rendered |
|
(reply generated by OpenAI Codex) Follow-up on the punctuation feedback: the PR description’s after screenshot has also been refreshed from the corrected renderer and now visibly shows “Too many attempts. Send a new code”. |
|
(reply generated by OpenAI Codex) CI context: the latest PR-attached E2E job did not execute the suite; it timed out waiting for Railway to mark deployment 66a7cf9 successful. Railway has an active build/deployment delay incident. The explicit environment run reached the suite but confirmed the preview still serves the prior revision, so I am not treating that run as validation of this final amendment. |
|
(reply generated by OpenAI Codex) Railway’s incident is resolved, the final deployment completed, and the current SHA now passes the full deployed E2E suite: https://github.com/hypercerts-org/ePDS/actions/runs/30563779378 |
66a7cf9 to
104bd75
Compare
104bd75 to
2e00832
Compare
|



Summary
Give users a clear way forward after better-auth rejects further attempts for an OTP. Interactive sign-in can send a new code, while account settings and recovery show honest guidance instead of implying that the locked code can still work.
Changes
Testing
pnpm format:checkpnpm lintpnpm typecheckpnpm testpnpm test:coverageScreenshots
Before: lockout produced a dead-end error with no direct recovery action.
After: the lockout state offers an inline Send a new code action. The preview response was controlled to isolate the final rendered state, including the sentence punctuation before the action.
Notes
The first PR-attached E2E attempt was blocked by Railway’s resolved build/deployment incident. After the deployment completed, the current SHA passed the full deployed suite in run 30563779378.
Focused extraction and review of work originally proposed in [WIP] many usability fixes (needs untangling) #165.
The classifier is necessarily coupled to better-auth's English error message because these call sites receive no structured lockout code.
PR auth: support mobile paste in segmented code input #204 overlaps only the interactive OTP-control portion; the account-settings and recovery changes are independent.
The initial deployed E2E run exposed an undefined step phrase; commit
16b752acorrected it and the deployed suite then passed.