# CrossDeviceAuthenticationHandlers

## Hierarchy

- `BaseCrossDeviceHandlers`
↳ **`CrossDeviceAuthenticationHandlers`**


## Properties

### onDeviceAttach

• **onDeviceAttach**: () => `Promise`<`void`>

#### Type declaration

▸ (): `Promise`<`void`>

Called when the user has successfully attached a device to the cross-device flow using the [attachDevice](/sdk-ref/authnsdk/interfaces/webauthncrossdeviceflows#attachdevice) method.

##### Returns

`Promise`<`void`>

#### Inherited from

BaseCrossDeviceHandlers.onDeviceAttach

### onFailure

• **onFailure**: (`error`: [`ApiCrossDeviceStatusResponse`](/sdk-ref/authnsdk/interfaces/apicrossdevicestatusresponse)) => `Promise`<`void`>

#### Type declaration

▸ (`error`): `Promise`<`void`>

Called when there was an error in the cross-device flow with status response [ApiCrossDeviceStatusResponse](/sdk-ref/authnsdk/interfaces/apicrossdevicestatusresponse).

##### Parameters

| Name | Type |
|  --- | --- |
| `error` | [`ApiCrossDeviceStatusResponse`](/sdk-ref/authnsdk/interfaces/apicrossdevicestatusresponse) |


##### Returns

`Promise`<`void`>

#### Inherited from

BaseCrossDeviceHandlers.onFailure

### onCredentialAuthenticate

• **onCredentialAuthenticate**: (`sessionId`: `string`) => `Promise`<`void`>

#### Type declaration

▸ (`sessionId`): `Promise`<`void`>

Called upon successful webauthn authentication.

##### Parameters

| Name | Type | Description |
|  --- | --- | --- |
| `sessionId` | `string` | Session ID that will be exchanged for the user's access and ID tokens using the /v1/auth/session/authenticate API |


##### Returns

`Promise`<`void`>