Skip to content

Passkey support doesn't provide getAuthenticatorData for WebAuthn #2061

@ForNeVeR

Description

@ForNeVeR

Expected Behavior

I am trying to authenticate using Passkey on a test site of WebAuthn.NET library (sources are here), and it doesn't work: the library throws an exception when trying to access response.getAuthenticatorData function on the received object.

Current Behavior

The following snippet throws an error, because there's no getAuthenticatorData function:

const responseAuthenticatorData = newCredential.response?.getAuthenticatorData();

(newCredential.response here is meant to be an AuthenticatorAttestationResponse, here's a link to the spec)

Link to the corresponding JS sources.

Possible Solution

keepasssc-browser should implement a corresponding part of the spec and provide all the methods required by the spec on its response object somehow.

Steps to Reproduce (for bugs)

(Copied from my report at dodobrands/WebAuthn.Net#1)

I'm trying to use KeePassXC's passkey support with WebAuthn.Net, and it fails.

My environment is Windows 11.

  1. Install the latest snapshot version KeePassXC (only that one supports passkeys for now).
  2. Start KeePassXC, open or create a database.
  3. In the KeePassXC settings, enable the browser support, also install the Chrome extension.
  4. In the browser extension settings, enable Passkey generator:
    image
  5. Try to register at https://webauthn.vanbukin.com

Expected result: same as with other passkey providers, it should generate a new passkey and authenticate.
Actual result: KeePassXC successfully shows its window to generate the passkey, but nothing happens after I generate it. The KeePassXC window just closes.

In the browser console, I see the following error message:

Uncaught (in promise) TypeError: newCredential.response?.getAuthenticatorData is not a function
   at completeRegistration (lib.js:129:71)
   at HTMLButtonElement.onRegisterButtonHandler (register.js:100:42)

Note that KeePassXC works well on the test site https://webauthn.io/, so I believe it is a problem with WebAuthn.Net.

Debug info

KeePassXC - Version 2.8.0-snapshot
Build Type: Snapshot
Revision: 681a0f5

Qt 5.15.6
Debugging mode is disabled.

Operating system: Windows 10 Version 2009
CPU architecture: x86_64
Kernel: winnt 10.0.22631

Enabled extensions:
- Auto-Type
- Browser Integration
- Passkeys
- SSH Agent
- KeeShare
- YubiKey
- Quick Unlock

Cryptographic libraries:
- Botan 2.19.1

KeePassXC-Browser Version: 1.8.10
Operating system: Win
Browser: Chrome 120.0.6099.130

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions