fix(api): only classify a passkey as switchable when a code method exists - #3528
Merged
Conversation
Tighten the 2FA-method classifier so 'passkey' requires a CODE-based alternative (authenticator app, SMS, or email code). A passkey / security-key prompt whose only alternative is a device approval, push, or email/SMS link is now 'other' — so the take-over panel doesn't tell the user to 'enter a code' when no code method is actually available.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
claudfuen
pushed a commit
that referenced
this pull request
Jul 29, 2026
# [3.111.0](v3.110.1...v3.111.0) (2026-07-29) ### Bug Fixes * **api:** classify the take-over method on an unclear outcome too ([539fdba](539fdba)) * **api:** only classify a switchable passkey when a code method exists ([#3528](#3528)) ([0d79093](0d79093)) * **app:** make a half-finished connect resumable, not a forced full-screen step ([#3525](#3525)) ([b1afcae](b1afcae)) * **cloud-security:** add missing logGroupName to CreateLogGroup remediation ([#3515](#3515)) ([76ae56c](76ae56c)) * harden sign-in classification + align take-over messaging ([#3527](#3527)) ([914cb1e](914cb1e)) * **integrations:** wrap aws add account form in dialog and scroll into view ([#3526](#3526)) ([07e91ae](07e91ae)), closes [#418](#418) * make the 2FA take-over universal — tailor guidance to what the page asks for ([#3520](#3520)) ([b12f3fe](b12f3fe)) * **policies:** remove archived policies from framework controls after unlinking ([#3513](#3513)) ([d639df2](d639df2)) * **training:** defer completion email and share canonical training IDs ([#3529](#3529)) ([fecb556](fecb556)) * **training:** remove rbac gate from mark-complete endpoint ([#3501](#3501)) ([8c5e98f](8c5e98f)), closes [#3455](#3455) ### Features * connection longevity + one-click 'Make permanent' 2FA ([#3524](#3524)) ([7345e3c](7345e3c)) * **policies:** add bulk upload for policy migration ([#3514](#3514)) ([1940f06](1940f06)) * **security-questionnaire:** add browser extension ([#3064](#3064)) ([e678421](e678421))
Contributor
|
🎉 This PR is included in version 3.111.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What
Follow-up to the review on the sign-in classifier (the earlier fixes merged in #3527). This closes the remaining nuance on the passkey finding.
Previously
passkeymeant "a passkey prompt with any other method available." But if that other method is a device approval / push / email-link (not a code), the take-over panel would still tell the user to "choose an authenticator/SMS/email code and enter it" — even though no code method exists.Now the classifier is precise:
passkey— a passkey/security-key prompt AND a code-based method (authenticator app, SMS, or email code) can be chosen instead.passkey_only— a passkey/security key with no usable alternative.other— anything else, including a passkey prompt whose only alternative is a device approval / push / email link (so it routes to the generic "finish sign-in yourself" panel, not the code panel).Scope
Prompt wording only in
browser-login-classifier.ts(classifyTwoFactorMethod). No contract/type change.Note
This is LLM-prompt hardening — behavior isn't 100% guaranteed — but it removes a misleading-guidance edge case, and take-over stays interactive so it degrades gracefully.
Tests
12 classifier tests green (they assert the return-value contract; mocked
extract), typecheck clean.Summary by cubic
Fix sign-in 2FA classification so "passkey" is only returned when a code-based alternative (authenticator app, SMS, or email code) is available. Passkey prompts that only offer device approval/push/email link are now "other," preventing code-entry guidance when no code exists.
Written for commit a9b4f0c. Summary will update on new commits.