Laravel WebAuthn: AttestationCancelled: The credentials creation was cancelled by the user or a timeout

46 Views Asked by At

I'm using Laragear/Webauthn and Laragear/Webpass, however, when attesting, even if I set my fingerprint, scan the QR, use Touch ID, It always throws:

[Error] AttestationCancelled: The credentials creation was cancelled by the user or a timeout. — passkeys:1135
    _callee$ (passkeys:64)
    tryCatch (passkeys:19:1067)
    (anonymous function) (passkeys:19:3021)
    asyncGeneratorStep (passkeys:20:104)
    _next (passkeys:21:213)

my code:

const createPasskey = async () => {

if (await Webpass.isUnsupported()) {
    return alert("Your browser doesn't support WebAuthn.")
}

const {credential, success, error, id} = await Webpass.attest("/webauthn/register/options", {
    path: "/webauthn/register",
    body: {
        alias: passKeyAlias.value
    }
})


if (success) {
    console.log("Credential", credential)
    console.log("ID", id)
    successfullyCreated.value = true
} else {
    console.error(error)
}

For the backend, I'm using default config for laragear/webauthn, I'm also using laravel nova.

0

There are 0 best solutions below