fix(auth): harden one-time link recovery - #73
Merged
Conversation
Signed-off-by: StringKE <stringke.me@gmail.com>
Signed-off-by: StringKE <stringke.me@gmail.com>
StringKe
added a commit
that referenced
this pull request
Aug 14, 2026
Bump the repository release version to 0.0.5 and generate release notes for the one-time-link recovery fix merged in PR #73. Signed-off-by: StringKE <stringke.me@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
The scrubbed credential was retained under a route-wide sessionStorage key without proving that the current History entry originated from that link. A later visit could therefore recover a stale one-time credential. Terminal errors also shared UI behavior with transient failures, which either left stale state behind or prevented a safe retry. Existing structured logs identified only the public error code, not the failed verification stage.
User impact
Magic Link, email verification, and password reset pages now keep credentials only for same-entry reload recovery. Expired or invalid credentials transition to localized recovery states, transient failures expose a retry action, and users never see raw JSON from these Hosted UI flows.
Validation
pnpm checkpnpm testfocused Core regression suite: 40 tests
pnpm --filter @xid-kit/server typecheckpnpm run security:secret-scangit diff --checkNo secrets,
.envfiles, real tokens, private keys, or real tenant data in the diffCommit includes DCO sign-off