# Registration.deserializeResponse

Deserializes a serialized registration response.

## Imports

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

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

## Examples

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

const response = Registration.deserializeResponse({
  // [!code focus]
  credential: {
    // [!code focus]
    attestationObject: 'o2NmbXRkbm9uZQ...', // [!code focus]
    clientDataJSON: 'eyJ0eXBlIjoid2Vi...', // [!code focus]
    id: 'm1-bMPuAqpWhCxHZQZTT6e-lSPntQbh3opIoGe7g4Qs', // [!code focus]
    publicKey: '0x04ab891400...', // [!code focus]
    raw: {
      id: '...',
      type: 'public-key',
      authenticatorAttachment: 'platform',
      rawId: '...',
      response: { clientDataJSON: 'eyJ0eXBlIjoid2Vi...' }
    } // [!code focus]
  }, // [!code focus]
  counter: 0 // [!code focus]
}) // [!code focus]
```

## Definition

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

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

## Parameters

### response

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

The serialized registration response.

#### response.backedUp

* **Type:** `boolean`
* **Optional**

#### response.counter

* **Type:** `number`

#### response.credential

* **Type:** `Credential`

#### response.deviceType

* **Type:** `"multiDevice" | "singleDevice"`
* **Optional**

#### response.userVerified

* **Type:** `true`
* **Optional**

## Return Type

The deserialized registration response.

[`Registration.Response`](/webauthn/webauthn/Registration/types#registrationresponse)
