# WebAuthnP256.verify

Verifies a signature using the Credential's public key and the challenge which was signed.

## Imports

:::code-group
```ts [Named]
import { WebAuthnP256 } from 'ox'
```

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

## Examples

```ts twoslash
import { WebAuthnP256 } from 'ox'

const credential = await WebAuthnP256.createCredential({
  name: 'Example'
})

const { metadata, signature } = await WebAuthnP256.sign({
  credentialId: credential.id,
  challenge: '0xdeadbeef'
})

const result = await WebAuthnP256.verify({
  // [!code focus]
  metadata, // [!code focus]
  challenge: '0xdeadbeef', // [!code focus]
  publicKey: credential.publicKey, // [!code focus]
  signature // [!code focus]
}) // [!code focus]
// @log: true
```

## Definition

```ts
function verify(
  options: verify.Options,
): boolean
```

**Source:** [src/core/WebAuthnP256.ts](https://github.com/wevm/ox/blob/main/src/core/WebAuthnP256.ts#L401)

## Parameters

### options

* **Type:** `verify.Options`

Options.

## Return Type

Whether the signature is valid.

`boolean`
