# @askrjs/auth/webauthn-client

> Published API exports for @askrjs/auth/webauthn-client.

Source: [https://askrjs.com/docs/reference/api/auth/webauthn-client](https://askrjs.com/docs/reference/api/auth/webauthn-client)

Status: stable. Packages: @askrjs/auth/webauthn-client.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 8 exports from the declarations shipped by @askrjs/auth.

### `createPasskey`

```ts
createPasskey: (options: CreatePasskeyOptions) => Promise<PasskeyRegistration>
```

Create a passkey through the browser WebAuthn API.

### `CreatePasskeyOptions`

```ts
CreatePasskeyOptions: any
```

Registration ceremony inputs for creating a passkey.

- `challenge`: Base64url challenge from the server.

- `rpId`: Relying-party identifier.

- `rpName`: Human-readable relying-party name.

- `userId`: Base64url user identifier.

- `userName`: User name displayed by the authenticator.

- `userDisplayName`: Human-readable user display name.

- `userVerification`: Required user-verification policy.

### `decodeBase64Url`

```ts
decodeBase64Url: (value: string) => ArrayBuffer
```

Decode canonical unpadded base64url.

### `encodeBase64Url`

```ts
encodeBase64Url: (buffer: ArrayBuffer) => string
```

Encode binary data as unpadded base64url.

### `getPasskeyAssertion`

```ts
getPasskeyAssertion: (options: GetPasskeyAssertionOptions) => Promise<PasskeyAssertion>
```

Request a passkey assertion through the browser WebAuthn API.

### `GetPasskeyAssertionOptions`

```ts
GetPasskeyAssertionOptions: any
```

Authentication ceremony inputs for requesting a passkey assertion.

- `challenge`: Base64url challenge from the server.

- `rpId`: Relying-party identifier.

- `allowCredentials`: Optional allow-list of credential identifiers.

- `userVerification`: Required user-verification policy.

### `PasskeyAssertion`

```ts
PasskeyAssertion: any
```

Client-safe assertion returned to the server.

- `credentialId`: Base64url credential identifier.

- `clientDataJSON`: Browser client-data JSON.

- `authenticatorData`: Authenticator data.

- `signature`: Assertion signature.

### `PasskeyRegistration`

```ts
PasskeyRegistration: any
```

Client-safe registration credential returned to the server.

- `credentialId`: Base64url credential identifier.

- `clientDataJSON`: Browser client-data JSON.

- `attestationObject`: Browser attestation object.

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/auth/mfa/index.md) | [Next](https://askrjs.com/docs/reference/api/charts/root/index.md)
