Skip to content

fix(auth): auto-submit filled keyboard-interactive prompts#214

Open
RoryChou-flux wants to merge 2 commits intobinaricat:mainfrom
RoryChou-flux:fix/keyboard-interactive-auth-order
Open

fix(auth): auto-submit filled keyboard-interactive prompts#214
RoryChou-flux wants to merge 2 commits intobinaricat:mainfrom
RoryChou-flux:fix/keyboard-interactive-auth-order

Conversation

@RoryChou-flux
Copy link
Contributor

@RoryChou-flux RoryChou-flux commented Feb 25, 2026

Summary

  • Auto-fill password-like keyboard-interactive prompts from saved password.
  • Auto-submit keyboard-interactive requests when all prompts are already filled (prevents modal flash).
  • Prefer keyboard-interactive before password in password-only auth flows to avoid duplicate OTP challenges.

Behavior Notes

  • No behavior change for key-only or agent-first flows.
  • Keyboard-interactive remains a fallback for non-password-only paths.

Validation

  • npm run -s lint -- components/KeyboardInteractiveModal.tsx
  • node --check electron/bridges/sshAuthHelper.cjs

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b527355005

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +222 to 223
authMethods.push({ type: "keyboard-interactive", id: "keyboard-interactive" });
authMethods.push({ type: "password", id: "password" });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep password before keyboard-interactive for MFA handshakes

In buildAuthHandler's password-only dynamic branch, putting keyboard-interactive before password breaks ordered MFA flows when fallback options are present (for example, OpenSSH AuthenticationMethods password,keyboard-interactive). The auth loop marks each method as attempted before checking methodsLeft, so an initial round with only password available consumes keyboard-interactive without sending it; after password succeeds with partial auth, the next round can no longer select keyboard-interactive and authentication fails.

Useful? React with 👍 / 👎.

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.

2 participants