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

## Type Aliases

### ComponentOverrideMap

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

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

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="totpblockedscreen_override"></a> `TOTPBlockedScreen_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:36](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L36) |
| <a id="totpcodeform_override"></a> `TOTPCodeForm_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:38](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L38) |
| <a id="totpcodeverificationfooter_override"></a> `TOTPCodeVerificationFooter_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:39](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L39) |
| <a id="totpcodeverificationheader_override"></a> `TOTPCodeVerificationHeader_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:40](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L40) |
| <a id="totpdeviceinfosection_override"></a> `TOTPDeviceInfoSection_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:43](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L43) |
| <a id="totpdevicesetupfooter_override"></a> `TOTPDeviceSetupFooter_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:41](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L41) |
| <a id="totpdevicesetupheader_override"></a> `TOTPDeviceSetupHeader_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:42](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L42) |
| <a id="totploadingscreen_override"></a> `TOTPLoadingScreen_Override?` | `ComponentOverride`\<*typeof* [`SuperTokensWrapper`](index#supertokenswrapper-1)\> | [recipe/totp/types.ts:37](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L37) |

***

### Config

```ts check=false reason="Generated API signature"
type Config = UserInput & RecipeModuleConfig<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>;
```

Defined in: [recipe/totp/types.ts:142](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L142)

***

### GetRedirectionURLContext

```ts check=false reason="Generated API signature"
type GetRedirectionURLContext = never;
```

Defined in: [recipe/totp/types.ts:157](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L157)

***

### NormalisedConfig

```ts check=false reason="Generated API signature"
type NormalisedConfig = object & NormalisedRecipeModuleConfig<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>;
```

Defined in: [recipe/totp/types.ts:145](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L145)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `override` | `object` | [recipe/totp/types.ts:148](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L148) |
| `override.functions()` | (`originalImplementation`, `builder?`) => [`SuperTokensWrapper`](index#supertokenswrapper-1) | [recipe/totp/types.ts:149](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L149) |
| `totpMFAScreen` | [`TOTPMFAScreenConfig`](#totpmfascreenconfig) | [recipe/totp/types.ts:146](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L146) |

***

### OnHandleEventContext

```ts check=false reason="Generated API signature"
type OnHandleEventContext = 
  | {
  action: "TOTP_CODE_VERIFIED";
  userContext: UserContext;
}
  | {
  action: "TOTP_DEVICE_VERIFIED";
  deviceName: string;
  userContext: UserContext;
  wasAlreadyVerified: boolean;
}
  | {
  action: "TOTP_DEVICE_CREATED";
  deviceName: string;
  userContext: UserContext;
};
```

Defined in: [recipe/totp/types.ts:173](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L173)

***

### PreAndPostAPIHookAction

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

Defined in: [recipe/totp/types.ts:159](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L159)

***

### PreAPIHookContext

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

Defined in: [recipe/totp/types.ts:166](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L166)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="action"></a> `action` | [`PreAndPostAPIHookAction`](#preandpostapihookaction) | [recipe/totp/types.ts:167](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L167) |
| <a id="requestinit"></a> `requestInit` | `RequestInit` | [recipe/totp/types.ts:168](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L168) |
| <a id="url"></a> `url` | `string` | [recipe/totp/types.ts:169](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L169) |
| <a id="usercontext"></a> `userContext` | [`UserContext`](types#usercontext) | [recipe/totp/types.ts:170](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L170) |

***

### TOTPDeviceInfo

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

Defined in: [recipe/totp/types.ts:46](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L46)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="devicename"></a> `deviceName` | `string` | [recipe/totp/types.ts:47](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L47) |
| <a id="qrcodestring"></a> `qrCodeString` | `string` | [recipe/totp/types.ts:49](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L49) |
| <a id="secret"></a> `secret` | `string` | [recipe/totp/types.ts:48](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L48) |
| <a id="useridentifier"></a> `userIdentifier?` | `string` | [recipe/totp/types.ts:50](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L50) |

***

### TOTPMFAAction

```ts check=false reason="Generated API signature"
type TOTPMFAAction = 
  | {
  callingCreateDevice: boolean;
  deviceInfo: TOTPDeviceInfo | undefined;
  error: string | undefined;
  showAccessDenied: boolean;
  showBackButton: boolean;
  type: "load";
}
  | {
  deviceInfo: TOTPDeviceInfo;
  type: "createDevice";
}
  | {
  error: string | undefined;
  nextRetryAt: number;
  type: "setBlocked";
}
  | {
  currAttemptCount?: number;
  error: string | undefined;
  maxAttemptCount?: number;
  showAccessDenied: boolean;
  type: "setError";
}
  | {
  error: string | undefined;
  type: "restartFlow";
}
  | {
  type: "success";
}
  | {
  type: "showSecret";
};
```

Defined in: [recipe/totp/types.ts:53](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L53)

***

### TOTPMFAChildProps

```ts check=false reason="Generated API signature"
type TOTPMFAChildProps = Omit<TOTPMFAProps, "featureState" | "dispatch">;
```

Defined in: [recipe/totp/types.ts:121](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L121)

***

### TOTPMFACommonProps

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

Defined in: [recipe/totp/types.ts:102](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L102)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="config-1"></a> `config` | [`NormalisedConfig`](#normalisedconfig) | [recipe/totp/types.ts:105](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L105) |
| <a id="featurestate"></a> `featureState` | [`TOTPMFAState`](#totpmfastate) | [recipe/totp/types.ts:103](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L103) |
| <a id="recipeimplementation"></a> `recipeImplementation` | [`SuperTokensWrapper`](index#supertokenswrapper-1) | [recipe/totp/types.ts:104](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L104) |
| <a id="usercontext-1"></a> `userContext?` | [`UserContext`](types#usercontext) | [recipe/totp/types.ts:106](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L106) |

***

### TOTPMFAProps

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

Defined in: [recipe/totp/types.ts:109](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L109)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="config-2"></a> `config` | [`NormalisedConfig`](#normalisedconfig) | [recipe/totp/types.ts:111](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L111) |
| <a id="dispatch"></a> `dispatch` | `Dispatch`\<[`TOTPMFAAction`](#totpmfaaction)\> | [recipe/totp/types.ts:117](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L117) |
| <a id="featurestate-1"></a> `featureState` | [`TOTPMFAState`](#totpmfastate) | [recipe/totp/types.ts:118](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L118) |
| <a id="onbackbuttonclicked"></a> `onBackButtonClicked` | () => `void` | [recipe/totp/types.ts:114](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L114) |
| <a id="onretryclicked"></a> `onRetryClicked` | () => `void` | [recipe/totp/types.ts:115](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L115) |
| <a id="onshowsecretclicked"></a> `onShowSecretClicked` | () => `void` | [recipe/totp/types.ts:113](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L113) |
| <a id="onsignoutclicked"></a> `onSignOutClicked` | () => `void` | [recipe/totp/types.ts:116](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L116) |
| <a id="onsuccess"></a> `onSuccess` | () => `void` | [recipe/totp/types.ts:112](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L112) |
| <a id="recipeimplementation-1"></a> `recipeImplementation` | [`SuperTokensWrapper`](index#supertokenswrapper-1) | [recipe/totp/types.ts:110](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L110) |
| <a id="usercontext-2"></a> `userContext?` | [`UserContext`](types#usercontext) | [recipe/totp/types.ts:119](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L119) |

***

### TOTPMFAScreenConfig

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

Defined in: [recipe/totp/types.ts:123](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L123)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="blockedscreenstyle"></a> `blockedScreenStyle` | `string` | [recipe/totp/types.ts:127](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L127) |
| <a id="disabledefaultui"></a> `disableDefaultUI` | `boolean` | [recipe/totp/types.ts:124](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L124) |
| <a id="loadingscreenstyle"></a> `loadingScreenStyle` | `string` | [recipe/totp/types.ts:128](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L128) |
| <a id="setupscreenstyle"></a> `setupScreenStyle` | `string` | [recipe/totp/types.ts:125](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L125) |
| <a id="verificationscreenstyle"></a> `verificationScreenStyle` | `string` | [recipe/totp/types.ts:126](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L126) |

***

### TOTPMFAState

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

Defined in: [recipe/totp/types.ts:89](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L89)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="currattemptcount"></a> `currAttemptCount?` | `number` | [recipe/totp/types.ts:98](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L98) |
| <a id="deviceinfo"></a> `deviceInfo?` | [`TOTPDeviceInfo`](#totpdeviceinfo) | [recipe/totp/types.ts:90](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L90) |
| <a id="error"></a> `error` | `string` \| `undefined` | [recipe/totp/types.ts:96](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L96) |
| <a id="isblocked"></a> `isBlocked` | `boolean` | [recipe/totp/types.ts:93](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L93) |
| <a id="loaded"></a> `loaded` | `boolean` | [recipe/totp/types.ts:95](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L95) |
| <a id="maxattemptcount"></a> `maxAttemptCount?` | `number` | [recipe/totp/types.ts:97](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L97) |
| <a id="nextretryat"></a> `nextRetryAt?` | `number` | [recipe/totp/types.ts:92](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L92) |
| <a id="showaccessdenied"></a> `showAccessDenied` | `boolean` | [recipe/totp/types.ts:99](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L99) |
| <a id="showbackbutton"></a> `showBackButton` | `boolean` | [recipe/totp/types.ts:94](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L94) |
| <a id="showsecret"></a> `showSecret` | `boolean` | [recipe/totp/types.ts:91](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L91) |

***

### UserInput

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

Defined in: [recipe/totp/types.ts:131](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L131)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `override?` | `object` | [recipe/totp/types.ts:134](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L134) |
| `override.functions()?` | (`originalImplementation`, `builder?`) => [`SuperTokensWrapper`](index#supertokenswrapper-1) | [recipe/totp/types.ts:135](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L135) |
| `totpMFAScreen?` | `Partial`\<[`TOTPMFAScreenConfig`](#totpmfascreenconfig)\> | [recipe/totp/types.ts:132](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/totp/types.ts#L132) |
