Skip to content

fix(fido2): remove duplicate touch prompt#332

Merged
jdx merged 1 commit intomainfrom
fix/fido2-remove-duplicate-touch-msg
Mar 8, 2026
Merged

fix(fido2): remove duplicate touch prompt#332
jdx merged 1 commit intomainfrom
fix/fido2-remove-duplicate-touch-msg

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Mar 8, 2026

Summary

  • Remove redundant "Touch your FIDO2 key..." message since the ctap_hid_fido2 library already prints "- Touch the sensor on the authenticator"

Test plan

  • Manual test: run fnox get or fnox set with a FIDO2 provider, verify only one touch prompt appears

🤖 Generated with Claude Code


Note

Low Risk
Single log/UX-only change in the FIDO2 provider with no impact to credential, PIN, or cryptographic handling.

Overview
Removes the extra eprintln!("Touch your FIDO2 key...") emitted during get_hmac_secret() so CLI users only see the touch prompt produced by ctap_hid_fido2 when performing an assertion.

Written by Cursor Bugbot for commit 9f86d42. This will update automatically on new commits. Configure here.

The ctap_hid_fido2 library already prints "- Touch the sensor on the
authenticator", so our "Touch your FIDO2 key..." message was redundant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the user experience when interacting with FIDO2 devices by eliminating a duplicate prompt. Previously, users would see two messages asking them to touch their FIDO2 key, which was confusing. This change ensures only one clear instruction is displayed, making the process smoother and less repetitive.

Highlights

  • FIDO2 Prompt Redundancy: Removed a redundant "Touch your FIDO2 key..." message to prevent duplicate prompts during FIDO2 operations, as the underlying ctap_hid_fido2 library already provides a similar message.
Changelog
  • src/providers/fido2.rs
    • Removed the explicit eprintln! call for the FIDO2 touch prompt.
Activity
  • No specific activity or comments have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes a redundant user prompt to touch the FIDO2 key. As the underlying ctap_hid_fido2 library already provides this prompt, this change correctly de-duplicates the message and improves the command-line user experience. The change is straightforward and effective.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 8, 2026

Greptile Summary

This PR removes the redundant eprintln!("Touch your FIDO2 key..."); line from get_hmac_secret, eliminating the duplicate touch prompt shown alongside the ctap_hid_fido2 library's built-in "- Touch the sensor on the authenticator" message. The change is minimal, correct, and improves UX by preventing user confusion from seeing two consecutive prompts during normal fnox get / fnox set operations.

Confidence Score: 5/5

  • This PR is safe to merge — it only removes a single redundant print statement with no behavioral impact on FIDO2 authentication logic.
  • The change is a straightforward single-line deletion of a cosmetic eprintln! call. It does not affect any authentication logic, error handling, or data flow. The removal is justified by the library's built-in prompt, which was confirmed by the PR's testing approach.
  • No files require special attention — the single changed file has a straightforward, low-risk deletion.

Sequence Diagram

sequenceDiagram
    participant User
    participant fnox as fnox (get_hmac_secret)
    participant lib as ctap_hid_fido2

    Note over fnox: Before this PR
    fnox->>User: eprintln!("Touch your FIDO2 key...") ❌ (removed)
    fnox->>lib: FidoKeyHidFactory::create()
    fnox->>lib: get_assertion_with_args()
    lib->>User: "- Touch the sensor on the authenticator"
    lib-->>fnox: hmac_secret

    Note over fnox: After this PR
    fnox->>lib: FidoKeyHidFactory::create()
    fnox->>lib: get_assertion_with_args()
    lib->>User: "- Touch the sensor on the authenticator" ✅ (single prompt)
    lib-->>fnox: hmac_secret
Loading

Last reviewed commit: 9f86d42

@jdx jdx enabled auto-merge (squash) March 8, 2026 20:54
@jdx jdx merged commit 92b8d2a into main Mar 8, 2026
18 checks passed
@jdx jdx deleted the fix/fido2-remove-duplicate-touch-msg branch March 8, 2026 21:01
jdx pushed a commit that referenced this pull request Mar 9, 2026
### 🚀 Features

- **(cloudflare)** add Cloudflare API token lease backend by
[@jdx](https://github.com/jdx) in
[#335](#335)
- **(fido2)** bump demand to v2, mask PIN during typing by
[@jdx](https://github.com/jdx) in
[#334](#334)
- **(init)** add -f as short alias for --force by
[@jdx](https://github.com/jdx) in
[#329](#329)
- **(lease)** add --all flag, default to creating all leases by
[@jdx](https://github.com/jdx) in
[#337](#337)
- **(lease)** add GitHub App installation token lease backend by
[@jdx](https://github.com/jdx) in
[#342](#342)

### 🐛 Bug Fixes

- **(config)** fix directory locations to follow XDG spec by
[@jdx](https://github.com/jdx) in
[#336](#336)
- **(exec)** use unix exec and exit silently on subprocess failure by
[@jdx](https://github.com/jdx) in
[#339](#339)
- **(fido2)** remove duplicate touch prompt by
[@jdx](https://github.com/jdx) in
[#332](#332)
- **(set)** write to lowest-priority existing config file by
[@jdx](https://github.com/jdx) in
[#331](#331)
- **(tui)** skip providers requiring interactive auth by
[@jdx](https://github.com/jdx) in
[#333](#333)

### 🛡️ Security

- **(ci)** retry lint step to handle transient pkl fetch failures by
[@jdx](https://github.com/jdx) in
[#341](#341)
- **(mcp)** add MCP server for secret-gated AI agent access by
[@jdx](https://github.com/jdx) in
[#343](#343)
- add guide for fnox sync by [@jdx](https://github.com/jdx) in
[#328](#328)

### 🔍 Other Changes

- share Rust cache across CI jobs by [@jdx](https://github.com/jdx) in
[#340](#340)
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