---
title: supertokens-auth-react/recipe/totp
description: References documentation for the supertokens-auth-react/recipe/totp package
sidebar:
  order: 190
---

## Classes

### default

Defined in: [recipe/totp/index.ts:31](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L31)

#### Constructors

##### Constructor

```ts check=false reason="Generated API signature"
new default(): default;
```

###### Returns

[`default`](#default)

#### Properties

| Property | Modifier | Type | Default value | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| <a id="componentsoverrideprovider"></a> `ComponentsOverrideProvider` | `static` | `any` | `RecipeComponentsOverrideContextProvider` | [recipe/totp/index.ts:71](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L71) |

#### Methods

##### createDevice()

```ts check=false reason="Generated API signature"
static createDevice(input?): any;
```

Defined in: [recipe/totp/index.ts:35](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L35)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `deviceName?`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.deviceName?` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

##### init()

```ts check=false reason="Generated API signature"
static init(config?): any;
```

Defined in: [recipe/totp/index.ts:32](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L32)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `config?` | [`UserInput`](recipe-totp-types#userinput) |

###### Returns

`any`

##### listDevices()

```ts check=false reason="Generated API signature"
static listDevices(input?): any;
```

Defined in: [recipe/totp/index.ts:64](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L64)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

##### removeDevice()

```ts check=false reason="Generated API signature"
static removeDevice(input): any;
```

Defined in: [recipe/totp/index.ts:58](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L58)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `deviceName`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.deviceName` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

##### verifyCode()

```ts check=false reason="Generated API signature"
static verifyCode(input): any;
```

Defined in: [recipe/totp/index.ts:41](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L41)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `options?`: `RecipeFunctionOptions`; `totp`: `string`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.options?` | `RecipeFunctionOptions` |
| `input.totp` | `string` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

##### verifyDevice()

```ts check=false reason="Generated API signature"
static verifyDevice(input): any;
```

Defined in: [recipe/totp/index.ts:47](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L47)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `deviceName`: `string`; `options?`: `any`; `totp`: `string`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.deviceName` | `string` |
| `input.options?` | `any` |
| `input.totp` | `string` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

## Variables

### createDevice()

```ts check=false reason="Generated API signature"
const createDevice: (input?) => any = Wrapper.createDevice;
```

Defined in: [recipe/totp/index.ts:75](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L75)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `deviceName?`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.deviceName?` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

***

### init()

```ts check=false reason="Generated API signature"
const init: (config?) => any = Wrapper.init;
```

Defined in: [recipe/totp/index.ts:74](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L74)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `config?` | [`UserInput`](recipe-totp-types#userinput) |

#### Returns

`any`

***

### listDevices()

```ts check=false reason="Generated API signature"
const listDevices: (input?) => any = Wrapper.listDevices;
```

Defined in: [recipe/totp/index.ts:79](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L79)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

***

### removeDevice()

```ts check=false reason="Generated API signature"
const removeDevice: (input) => any = Wrapper.removeDevice;
```

Defined in: [recipe/totp/index.ts:78](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L78)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `deviceName`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.deviceName` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

***

### TOTPComponentsOverrideProvider

```ts check=false reason="Generated API signature"
const TOTPComponentsOverrideProvider: any = Wrapper.ComponentsOverrideProvider;
```

Defined in: [recipe/totp/index.ts:80](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L80)

***

### verifyCode()

```ts check=false reason="Generated API signature"
const verifyCode: (input) => any = Wrapper.verifyCode;
```

Defined in: [recipe/totp/index.ts:76](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L76)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `options?`: `RecipeFunctionOptions`; `totp`: `string`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.options?` | `RecipeFunctionOptions` |
| `input.totp` | `string` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

***

### verifyDevice()

```ts check=false reason="Generated API signature"
const verifyDevice: (input) => any = Wrapper.verifyDevice;
```

Defined in: [recipe/totp/index.ts:77](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/index.ts#L77)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `deviceName`: `string`; `options?`: `any`; `totp`: `string`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.deviceName` | `string` |
| `input.options?` | `any` |
| `input.totp` | `string` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

## References

### GetRedirectionURLContext

Re-exports [GetRedirectionURLContext](recipe-totp-types#getredirectionurlcontext)

***

### OnHandleEventContext

Re-exports [OnHandleEventContext](recipe-totp-types#onhandleeventcontext)

***

### PreAPIHookContext

Re-exports [PreAPIHookContext](recipe-totp-types#preapihookcontext)

***

### RecipeInterface

Renames and re-exports [SuperTokensWrapper](index#supertokenswrapper-1)

***

### UserInput

Re-exports [UserInput](recipe-totp-types#userinput)
