toip.tools

function · Browser and Node

webAuthnSigner

A hook for passkeys. getAssertion runs navigator.credentials.get with the given challenge, which is SHA-256 of the message. The event then carries the assertion (our -Y group; not KERI).

@toip-tools/eventlogView source
TypeScriptImport
import { webAuthnSigner } from "@toip-tools/eventlog";

Declaration

TypeScriptSignature
webAuthnSigner(opts: {
    publicKey: Uint8Array;
    getAssertion: (challenge: Uint8Array) => Promise<WebAuthnAssertion>;
}): Signer;

Parameters

optsrequired
{ publicKey: Uint8Array; getAssertion: (challenge: Uint8Array) => Promise<WebAuthnAssertion>; }
Fields of opts
publicKeyrequired
Uint8Array<ArrayBufferLike>
getAssertionrequired
(challenge: Uint8Array) => Promise<WebAuthnAssertion>

Returns