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.

Comment From: rwinch

Thanks for the issue and the PR! Closing in favor of the pull request gh-16440