Skip to content

fix(auth): select offered TOTP methods when configured - #619

Open
Disaster-Terminator wants to merge 2 commits into
TheNetsky:v4from
Disaster-Terminator:fix/modern-totp-selection
Open

Disaster-Terminator wants to merge 2 commits into
TheNetsky:v4from
Disaster-Terminator:fix/modern-totp-selection

Conversation

@Disaster-Terminator

Copy link
Copy Markdown

When a sign-in method picker offers an authenticator code, accounts with a configured totpSecret still select push approval. Existing TOTP classifications were ignored by the picker, and the current phone/desktop SVG was classified as UNKNOWN.

Recognize that code tile and select an offered TOTP method when a secret is configured, including methods matched by the existing phone_app_otp / totp rules. Configured password precedence is preserved, and selection continues through the existing 2FA_TOTP handler.

Local validation:

  • TypeScript build, ESLint for changed code, Prettier and diff checks pass.
  • Six offline Chromium regression tests pass, including SIGN_IN_METHOD_PICKER → 2FA_TOTP → handler with the configured secret. The same suite fails classification and selection against unmodified upstream v4.
  • Nine existing log-parser tests pass.
  • Earlier live Docker verification on 4.3.2 exercised this classification/selection path, completed TOTP verification, entered Rewards and saved the desktop session. This current-upstream branch was verified offline.

Run after installing the locked dependencies and Patchright Chromium:

npm run build
npm run test:login-totp
npm run test:log-parser

The SVG match follows the existing structural classifier and may need updating when Microsoft changes the icon. The fix applies to code verification offered in the visible method picker.

Related: #520 addressed a similar unattended-TOTP problem in the v3 passwordless flow. This fixes the v4 method picker directly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant