# Authentication.deserializeResponse

Deserializes a serialized authentication response.

## 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 response = Authentication.deserializeResponse({
  // [!code focus]
  id: 'm1-bMPuAqpWhCxHZQZTT6e-lSPntQbh3opIoGe7g4Qs', // [!code focus]
  metadata: {
    // [!code focus]
    authenticatorData: '0x49960de5...', // [!code focus]
    clientDataJSON: '{"type":"webauthn.get",...}', // [!code focus]
    challengeIndex: 23, // [!code focus]
    typeIndex: 1, // [!code focus]
    userVerificationRequired: true // [!code focus]
  }, // [!code focus]
  raw: {
    // [!code focus]
    id: 'm1-bMPuAqpWhCxHZQZTT6e-lSPntQbh3opIoGe7g4Qs', // [!code focus]
    type: 'public-key', // [!code focus]
    authenticatorAttachment: 'platform', // [!code focus]
    rawId: 'm1-bMPuAqpWhCxHZQZTT6e-lSPntQbh3opIoGe7g4Qs', // [!code focus]
    response: {
      clientDataJSON: 'eyJ0eXBlIjoid2ViYXV0aG4uZ2V0In0'
    } // [!code focus]
  }, // [!code focus]
  signature: '0x...' // [!code focus]
}) // [!code focus]
```

## Definition

```ts
function deserializeResponse(
  response: Response<true>,
): Response
```

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

## Parameters

### response

* **Type:** `Response<true>`

The serialized authentication response.

#### response.id

* **Type:** `string`

#### response.metadata

* **Type:** `{ authenticatorData: 0x${string}; challengeIndex?: number; clientDataJSON: string; typeIndex?: number; userVerificationRequired?: boolean; }`

#### response.raw

* **Type:** `PublicKeyCredential`

#### response.signature

* **Type:** `serialized extends true ? 0x${string} : { r: 0x${string}; s: 0x${string}; yParity?: number; }`

## Return Type

The deserialized authentication response.

`Response`
