Skip to content

Add support to set TouchID / Windows Hello authentication as preferred_webauthn on config file #491

Description

@jorgeclaro

Background

Currently, when multiple WebAuthn (FIDO2) authenticators are enrolled in Okta, gimme-aws-creds always shows the factor picker:

Pick a factor:
[0] webauthn: iCloud Keychain
[1] webauthn: me@company.com
[2] webauthn: Security Key NFC by Yubico

Even if the user wants to consistently use one preferred authenticator, the CLI does not offer any way to remember or auto-select a preferred WebAuthn factor.

Examples:

  • Touch ID on macOS
  • Windows Hello on Windows
  • A YubiKey / hardware security key

Proposal

Add an optional config key to .okta_aws_login_config:

[DEFAULT]
preferred_mfa_type = webauthn
preferred_webauthn = "webauthn: me@company.com"

Behavior

When logging in, the CLI fetches the list of available factors from Okta.

  • If the preferred_webauthn matches one of the WebAuthn factors exactly, the CLI auto-selects it.
  • If the preferred factor is unavailable (e.g., Touch ID not enabled, Windows Hello locked, hardware key not connected), the CLI falls back to the standard Okta picker.

Existing config keys (preferred_mfa_type) remain fully supported for non-WebAuthn factors (push, totp, etc.).

Benefits

  • Reduces unnecessary MFA picker prompts for users with multiple enrolled WebAuthn devices.
  • Improves UX for users who want to consistently use Touch ID, Windows Hello, or a specific security key.
  • Maintains security: fallback to picker ensures user always explicitly chooses if preferred factor isn’t available.
  • Fully backward-compatible: CLI continues to work for users who don’t set the new key.

Notes / Edge Cases

If preferred factor name is not returned by Okta API, the picker should be shown as fallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions