function · Browser and Node

# webAuthnSigner

A passkey as a signer (alg -65600). Each signature is a WebAuthn assertion whose challenge is SHA-256 of the Sig\_structure, with user verification required, so each one asks for the biometric or PIN.

`@toip-tools/cose` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/cose/src/signers.ts#L77)

Import:

```ts
import { webAuthnSigner } from "@toip-tools/cose";
```

## Declaration

Signature:

```ts
webAuthnSigner(opts: {
    credentialId: Uint8Array;
    rpId: string;
    publicKey: Uint8Array;
    kid: Uint8Array;
    get?: WebAuthnGet;
    timeout?: number;
}): AsyncSigner;
```

### Parameters

**`opts` (required)**

`{ credentialId: Uint8Array; rpId: string; publicKey: Uint8Array; kid: Uint8Array; get?: WebAuthnGet; timeout?: number; }`

**Fields of `opts`**

- **`credentialId` (required)**: `Uint8Array<ArrayBufferLike>`
- **`rpId` (required)**: `string`
- **`publicKey` (required)**: `Uint8Array<ArrayBufferLike>`
- **`kid` (required)**: `Uint8Array<ArrayBufferLike>`
- **`get` (optional)**: `WebAuthnGet | undefined`
- **`timeout` (optional)**: `number | undefined`

### Returns

`AsyncSigner`

[Usage guide](https://toip.tools/toolkit/cose/#usage) · [Error handling](https://toip.tools/toolkit/cose/#errors) · [All exports](https://toip.tools/toolkit/cose/api/)

---

This is the Markdown version of https://toip.tools/toolkit/cose/api/webAuthnSigner/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
