> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cskn.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Biometrics

> Confirm a sensitive action with Face ID, Touch ID or a fingerprint.

```tsx theme={null}
import { isAvailable, useBiometrics } from '@cskn/sdk';

function ConfirmPayment({ onConfirmed }: { onConfirmed: () => void }) {
  const biometrics = useBiometrics();

  const confirm = async () => {
    if (!isAvailable()) return askForPassword();

    const { available } = await biometrics.isAvailable();
    if (!available) return askForPassword();

    const { success, error } = await biometrics.authenticate({
      promptMessage: 'Confirm the payment',
      cancelLabel: 'Cancel',
    });
    if (success) onConfirmed();
    else console.log(error); // 'user_cancel' | 'system_cancel' | …
  };

  return <button onClick={confirm}>Pay</button>;
}
```

## isAvailable

Resolves `{ available, supportsFaceId, supportsFingerprint }`.

## authenticate

<ParamField path="promptMessage" type="string">Text shown in the system prompt.</ParamField>
<ParamField path="cancelLabel" type="string">Cancel button label.</ParamField>
<ParamField path="fallbackLabel" type="string">Label of the device passcode fallback.</ParamField>
<ParamField path="disableDeviceFallback" type="boolean" default="false">Disallow falling back to the device passcode.</ParamField>

Resolves `{ success, error? }`.

<Note>
  Biometrics is shell-only. In a browser, `isAvailable` resolves `available: false` and `authenticate` resolves `success: false, error: 'not_available'`. For sign-in or signing that also works in a browser, use [passkeys](/sdk/native/passkeys).
</Note>

Functions: `checkBiometricsAvailable`, `authenticateBiometrics`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.