Skip to content

[2.1] Attestation promise return is all undefined #41

@miken32

Description

@miken32

Bundler & Interpreter

Vite 7.3.1 Node 22.22.0

Browser & OS

Firefox 149/Safari 26.3 macOS 26.3

Have you done this?

  • I have checked my logs and I am sure is a bug in this package.
  • I can reproduce this bug in isolation (vanilla install)
  • I can suggest a workaround as a Pull Request

Expectation

I expect to be able to create a passkey

Description

During passkey creation, the passkey is created correctly on both the server and client. But the attestation promise contains only undefined values. The call to wfetch is returning undefined, even though the browser network inspector shows a successful request and 204 response.

Image

Reproduction

import Webpass from "@laragear/webpass";

if (Webpass.isSupported()) {
    document.getElementById("passkey-add")?.addEventListener("click", async function(e) {
        e.preventDefault();
        e.stopPropagation();
        const { credential, success, error } = await Webpass.attest("/webauthn/register/options", "/webauthn/register");
        if (success) {
            window.location.replace(`/passkeys/${credential.id}/edit`);
        } else {
            throw error
        }
    });
}

Stack trace & logs

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions