# Authentication.getOptions

Returns the request options to sign a challenge with the Web Authentication API.

## Imports

:::code-group
```ts [Named]
import { Authentication } from 'ox/webauthn'
```

```ts [Entrypoint]
import * as Authentication from 'ox/webauthn/Authentication'
```
:::

## Examples

```ts twoslash
import { Authentication } from 'ox/webauthn'

const options = Authentication.getOptions({
  challenge: '0xdeadbeef'
})

const credential =
  await window.navigator.credentials.get(options)
```

## Definition

```ts
function getOptions(
  options: getOptions.Options,
): Types.CredentialRequestOptions
```

**Source:** [src/webauthn/Authentication.ts](https://github.com/wevm/ox/blob/main/src/webauthn/Authentication.ts#L170)

## Parameters

### options

* **Type:** `getOptions.Options`

Options.

#### options.challenge

* **Type:** `0x${string}`

The challenge to sign.

#### options.credentialId

* **Type:** `string | string[]`
* **Optional**

The credential ID to use.

#### options.extensions

* **Type:** `AuthenticationExtensionsClientInputs`
* **Optional**

List of Web Authentication API credentials to use during creation or authentication.

#### options.rpId

* **Type:** `string`
* **Optional**

The relying party identifier to use.

#### options.timeout

* **Type:** `number`
* **Optional**

Time, in milliseconds, that the caller is willing to wait for the operation.

#### options.userVerification

* **Type:** `UserVerificationRequirement`
* **Optional**

The user verification requirement.

## Return Type

The credential request options.

`Types.CredentialRequestOptions`
