Skip to content

desktop: in-app browser never shows WebAuthn prompt; security keys / passkeys hang #60191

Open

Description

@aronstrandberg

Summary

The desktop app's in-app browser (Review pane) never shows a WebAuthn prompt. navigator.credentials.get() stays pending until it times out, with no UI and no error. Any site that requires a security key or passkey can't be signed into. One example is a Google Workspace account whose only second factor is a YubiKey: after the password step, nothing appears.

Environment

  • opencode version: 2.2.0 (desktop app UA: OpenCode/2.2.0 Chrome/152.0.7977.167 Electron/44.9.1). v2.2.1 release notes don't mention WebAuthn.
  • OS: desktop app on macOS (UA reports Intel Mac OS X 10_15_7). Connected to a remote server on Linux 6.12.63 (NixOS 26.05, x64).
  • Terminal: Rex (TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: bash
  • Install/channel: latest
  • Active plugins: one local plugin (opencode-gh-prs), not browser-related

Reproduction

  1. In the desktop app, open a browser tab (browser.tabs.open) to https://accounts.google.com/signin with an account that uses a security key for 2-Step Verification.

  2. Enter the password and click Next. Google shows "Use your passkey". Choosing it, or letting Google start the challenge automatically, shows nothing.

  3. Minimal repro on any HTTPS page, run in the in-app tab, with a USB security key plugged in:

    await navigator.credentials.get({ publicKey: {
      challenge: crypto.getRandomValues(new Uint8Array(32)),
      rpId: location.hostname, timeout: 20000, userVerification: "discouraged",
      allowCredentials: [{ type: "public-key", id: crypto.getRandomValues(new Uint8Array(64)), transports: ["usb", "nfc"] }],
    }});

Expected Behavior

The same behavior as Chrome: a security key / passkey dialog appears. Touching the key completes the request, and an unregistered key quickly returns NotAllowedError.

Actual Behavior

  • No dialog appears. The promise stays pending for the full timeout, and our AbortController fired after 20002 ms.
  • PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() returns false.
  • getClientCapabilities() still reports hybridTransport: true, passkeyPlatformAuthenticator: true and conditionalGet: true. Sites therefore offer passkey flows that can't complete.
  • Google shows the flow as flowName=WebLiteSignIn and stops at challenge/pk / challenge/selection (challengetype=53).

Additional Context

  • This looks like Electron's missing WebAuthn request UI on macOS (WebAuthn authentication prompt does not work on macOS electron/electron#27355). Electron provides no authenticator dialog, so requests that need user interaction never resolve. Other apps with built-in browsers hit the same problem (Codex App in-app browser does not invoke passkey/WebAuthn platform authenticator openai/codex#31204).
  • Impact: users whose organization requires hardware-key 2FA can't sign into Google SSO, or any WebAuthn-protected site, in the in-app browser. No password manager or setting works around it.
  • Possible fixes: implement a WebAuthn request UI for the in-app browser, or hand WebAuthn to the macOS AuthenticationServices framework (as electron-webauthn-mac does). At minimum, fail fast with NotAllowedError and stop reporting capabilities the browser can't fulfill.
  • Workaround today: sign in with an external browser instead.

Activity

  1. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Thanks for the detailed write-up and the minimal repro, @aronstrandberg!

    You're asking for WebAuthn (security keys and passkeys) to work in the desktop app's in-app browser, so sites like Google Workspace with hardware-key 2FA can be signed into there. At minimum, WebAuthn requests should fail fast with NotAllowedError instead of hanging, and the browser should stop reporting passkey capabilities it can't provide.

    Right now the in-app browser refuses permission and device requests and has no WebAuthn support at all. Electron also has no authenticator dialog of its own on macOS, so this would be new functionality rather than a regression. I've marked it as a feature request, and the hang and the misleading capability report are noted as part of it. Maintainers will consider it. Until then, an external browser is the way to sign in, as you found.

    Related issues about signing in from the built-in browser:

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

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