Repository navigation
fix(lockout): keep passkey sign-in out of lockout and enforce lockoutSeconds - #448
Merged
Merged
Conversation
…Seconds Failed code-factor attempts, which anyone with an ephemeral token can make, no longer lock an account out of its passkeys. A locked account continues with its passkey from /login. The lock lasts lockoutSeconds from the failure that crossed the threshold, and retryAfterSeconds reports the time actually left.
This was referenced Oct 18, 2026
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.
Fix for GHSA-66gq-4pwg-33jq. Reviewed privately in the advisory fork.
What changes
webauthn_login_failedleavesLOCKOUT_FAILURE_TYPES). An assertion cannot be guessed.POST /loginfor a locked account continues withloginMethods: ['passkey']when the account has one, and answers423only when it has none.maxFailuresinside onewindowSecondsand lastslockoutSecondsfrom there;retryAfterSecondsis the time actually left. The counter now reads the newestmaxFailuresfailures, filtered by type, so old passkey failures stop counting. Unreadable history still means locked.loginMethodsand the 423 body keep their shapes.Checks
npm run coverage: 136 files, 1818 passed, 1 todo. Statements 98.91%, branches 95.38%, functions 99.27%, lines 99.14%Residual
An account with no passkey can still be locked by repeated wrong codes, which is what lockout is for. Recovery for that case is v0.20 (#398, #399, #401).
Part of the v0.19 security release (#385). Rebased onto main after #440 to #446; 138 files, 1862 tests pass locally.