Skip to content

WebAuthn login fails when CredentialsRequestOptions.publicKey.allowCredentials is not empty #16439

Closed
@Kehrlann

Description

@Kehrlann

Describe the bug

When the list of allowed credentials is not null in the /webauthn/authenticate/options response is not empty, the "Sign in with Passkey" in the main UI does not work and reports "invalid credentials". See webauthn l3 > CredentialsRequestOptions.publicKey.allowCredentials)

The browser console gives the following stack trace:

Error: Authentication failed. Call to navigator.credentials.get failed: CredentialsContainer.get: 'id' member of PublicKeyCredentialDescriptor could not be converted to any of: ArrayBufferView, ArrayBuffer.
    authenticate http://localhost:8080/login/webauthn.js:81
    authenticateOrError http://localhost:8080/login/webauthn.js:198
    setupLogin http://localhost:8080/login/webauthn.js:207
    setupLogin http://localhost:8080/login/webauthn.js:206
    <anonymous> http://localhost:8080/login?error:12
    EventListener.handleEvent* http://localhost:8080/login?error:12

To Reproduce

  1. Create an empty app.
  2. Enable passkey sign-in with the default UI.
  3. Sign in.
  4. While signed in, go to /login.
  5. Click "sign in with a passkey"
  6. It fails with "Invalid credentials".

Will submit a PR for this.

Metadata

Metadata

Labels

in: webAn issue in web modules (web, webmvc)status: duplicateA duplicate of another issuetype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions