Skip to content

[Bug]: macOS platformPasskeys ignores userVerification, so third-party providers return assertions without UV #56080

Backlog

Description

@satoren

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

Electron Version

45.3.2 (the same code is on main)

What operating system(s) are you using?

macOS

Operating System Version

macOS 27.2.1

What arch are you using?

arm64 (including Apple M1)

Last Known Working Electron version

N/A (platformPasskeys was added in 45)

Does the issue also appear in Chromium / Google Chrome?

No

Chrome does not use this code path. Electron's own platformPasskeys integration (electron_platform_passkeys_authenticator_mac.mm) is where userVerificationPreference is never set.

Expected Behavior

When a page calls navigator.credentials.get() / create() with
userVerification: "required" and the app has enabled
app.configureWebAuthn({ platformPasskeys: true }), the request passed to
AuthenticationServices should carry the required user-verification preference.
The credential provider (iCloud Keychain, 1Password, ...) should then verify the
user and return authenticator data with the UV flag set.

Actual Behavior

ElectronPlatformPasskeysAuthenticator builds the request with
createCredentialAssertionRequestWithChallenge: /
createCredentialRegistrationRequestWithChallenge:name:userID: and never sets
userVerificationPreference
(shell/browser/webauthn/electron_platform_passkeys_authenticator_mac.mm).
Every request therefore goes out with Apple's default, preferred, whatever the
page asked for.

iCloud Keychain always verifies the user, so this is easy to miss. 1Password's
credential provider extension honours preferred by skipping verification when
the vault is already unlocked. The assertion comes back with UP=1 and UV=0.
Any relying party that requires user verification (as recommended for passkey
sign-in) rejects it.

The same 1Password passkey works on the same site in Chrome, where the 1Password
browser extension handles the ceremony and sets UV.

Decoded assertion from the Electron app (1Password, userVerification: "required"):

{
  "clientData": { "type": "webauthn.get", "origin": "https://<rpId>", "challengeMatches": true },
  "flags": { "UP": true, "UV": false, "BE": true, "BS": true },
  "rpIdHashMatches": true,
  "signCount": 0,
  "authenticatorAttachment": "platform"
}

Testcase Gist URL

None. Reproducing it needs a signed app with an associated domain.

Additional Information

Steps to reproduce:

  1. Sign a macOS app with the associated-domains entitlement
    (webcredentials:<rpId>) and call app.configureWebAuthn({ platformPasskeys: true }).
  2. Enable 1Password in System Settings → General → AutoFill & Passwords, and
    unlock it.
  3. On the RP page, call navigator.credentials.get({ publicKey: { challenge, rpId, userVerification: 'required' } })
    and choose a 1Password passkey.
  4. Bit 2 (UV) of the flags byte in authenticatorData is 0.

Suggested fix: map request.user_verification
(device::UserVerificationRequirement) onto
as_request.userVerificationPreference for both the assertion and the
registration request. A patch is ready and I can open a PR.

Related: #51563 (added platformPasskeys).

Activity

  1. github-actions commented on Nov 27, 2026

    @github-actions
    Contributor

    Hello @satoren. Thanks for taking the time to open an issue and helping to make Electron better!

    This issue was automatically closed because its body does not follow any of this repository's issue templates. Maintainers rely on the sections in those templates to triage issues, and issues that are missing them usually cannot be acted upon.

    To get this issue triaged, please either:

  2. moved this to 👀 Unsorted Items in 45-x-yon Nov 27, 2026
  3. catidegla commented on Nov 28, 2026

    @catidegla

    This is a client-conformance bug, not just a provider quirk. Translating the RP's options.userVerification into the authenticator's UV requirement is the client's job, so if Electron never sets userVerificationPreference, every ceremony goes out as Apple's default .preferred regardless of what the page asked. An RP that requested "required" is then trusting a guarantee the client quietly dropped. iCloud Keychain hides it by always verifying, but a provider that honors .preferred (1Password here) returns UP=1/UV=0, and a correct RP rejects it at the §7.2 user-verification check. The more dangerous flip side is an RP that only checks UP: it accepts an unverified assertion believing it was verified.

    The fix is to map the request's userVerification (required/preferred/discouraged) onto ASAuthorizationPublicKeyCredentialUserVerificationPreference and set it on the assertion request (and the matching property on the registration request), so the preference the page set actually reaches AuthenticationServices.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    • Status
      👀 Unsorted Items

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions