---
title: supertokens-web-js/recipe/totp/types
description: References documentation for the supertokens-web-js/recipe/totp/types package
sidebar:
  order: 200
---

## Type Aliases

### DeviceInfo

```ts check=false reason="Generated API signature"
type DeviceInfo = object;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:57](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L57)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="devicename"></a> `deviceName` | `string` | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:58](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L58) |
| <a id="qrcodestring"></a> `qrCodeString` | `string` | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:60](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L60) |
| <a id="secret"></a> `secret` | `string` | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:59](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L59) |

***

### InputType

```ts check=false reason="Generated API signature"
type InputType = AuthRecipeInputType<PreAndPostAPIHookAction> & UserInput;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:46](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L46)

***

### NormalisedInputType

```ts check=false reason="Generated API signature"
type NormalisedInputType = AuthRecipeNormalisedInputType<PreAndPostAPIHookAction> & object;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:48](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L48)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `override` | `object` | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:49](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L49) |
| `override.functions()` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:50](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L50) |

***

### PostAPIHookContext

```ts check=false reason="Generated API signature"
type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:35](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L35)

***

### PreAndPostAPIHookAction

```ts check=false reason="Generated API signature"
type PreAndPostAPIHookAction = 
  | "CREATE_DEVICE"
  | "VERIFY_CODE"
  | "VERIFY_DEVICE"
  | "REMOVE_DEVICE"
  | "LIST_DEVICES";
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:27](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L27)

***

### PreAPIHookContext

```ts check=false reason="Generated API signature"
type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:34](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L34)

***

### RecipeInterface

```ts check=false reason="Generated API signature"
type RecipeInterface = object;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:63](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L63)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="createdevice"></a> `createDevice` | (`input`) => `Promise`\< \| \{ `deviceName`: `string`; `fetchResponse`: `Response`; `qrCodeString`: `string`; `secret`: `string`; `status`: `"OK"`; \} \| \{ `fetchResponse`: `Response`; `status`: `"DEVICE_ALREADY_EXISTS_ERROR"`; \}\> | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:64](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L64) |
| <a id="listdevices"></a> `listDevices` | (`input`) => `Promise`\<\{ `devices`: `object`[]; `fetchResponse`: `Response`; `status`: `"OK"`; \}\> | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:110](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L110) |
| <a id="removedevice"></a> `removeDevice` | (`input`) => `Promise`\<\{ `didDeviceExist`: `boolean`; `fetchResponse`: `Response`; `status`: `"OK"`; \}\> | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:105](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L105) |
| <a id="verifycode"></a> `verifyCode` | (`input`) => `Promise`\< \| \{ `fetchResponse`: `Response`; `status`: `"OK"`; \} \| \{ `currentNumberOfFailedAttempts`: `number`; `fetchResponse`: `Response`; `maxNumberOfFailedAttempts`: `number`; `status`: `"INVALID_TOTP_ERROR"`; \} \| \{ `fetchResponse`: `Response`; `retryAfterMs`: `number`; `status`: `"LIMIT_REACHED_ERROR"`; \}\> | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:79](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L79) |
| <a id="verifydevice"></a> `verifyDevice` | (`input`) => `Promise`\< \| \{ `fetchResponse`: `Response`; `status`: `"OK"`; `wasAlreadyVerified`: `boolean`; \} \| \{ `currentNumberOfFailedAttempts`: `number`; `fetchResponse`: `Response`; `maxNumberOfFailedAttempts`: `number`; `status`: `"INVALID_TOTP_ERROR"`; \} \| \{ `fetchResponse`: `Response`; `status`: `"UNKNOWN_DEVICE_ERROR"`; \} \| \{ `fetchResponse`: `Response`; `retryAfterMs`: `number`; `status`: `"LIMIT_REACHED_ERROR"`; \}\> | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:89](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L89) |

***

### UserInput

```ts check=false reason="Generated API signature"
type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:37](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L37)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `override?` | `object` | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:38](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L38) |
| `override.functions()?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [tmp/supertokens-web-js/lib/ts/recipe/totp/types.ts:39](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/totp/types.ts#L39) |
