Skip to content

fix(api): only classify a passkey as switchable when a code method exists - #3528

Merged
tofikwest merged 1 commit into
mainfrom
fix/passkey-classifier-code-alt
Jul 28, 2026
Merged

fix(api): only classify a passkey as switchable when a code method exists#3528
tofikwest merged 1 commit into
mainfrom
fix/passkey-classifier-code-alt

Conversation

@tofikwest

@tofikwest tofikwest commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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 passkey meant "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.

Review in cubic

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.
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comp-framework-editor Ready Ready Preview, Comment Jul 28, 2026 9:03pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app Skipped Skipped Jul 28, 2026 9:03pm
portal Skipped Skipped Jul 28, 2026 9:03pm

Request Review

@tofikwest
tofikwest merged commit 0d79093 into main Jul 28, 2026
11 checks passed
@tofikwest
tofikwest deleted the fix/passkey-classifier-code-alt branch July 28, 2026 21:05
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))
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.111.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants