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

## Classes

### default

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

#### 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/multifactorauth/index.ts:96](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L96) |
| <a id="member-default-factorids"></a> `FactorIds` | `static` | `object` | `FactorIds` | [recipe/multifactorauth/index.ts:34](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L34) |
| `FactorIds.EMAILPASSWORD` | `readonly` | `"emailpassword"` | `"emailpassword"` | [recipe/multifactorauth/types.ts:132](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L132) |
| `FactorIds.LINK_EMAIL` | `readonly` | `"link-email"` | `"link-email"` | [recipe/multifactorauth/types.ts:135](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L135) |
| `FactorIds.LINK_PHONE` | `readonly` | `"link-phone"` | `"link-phone"` | [recipe/multifactorauth/types.ts:136](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L136) |
| `FactorIds.OTP_EMAIL` | `readonly` | `"otp-email"` | `"otp-email"` | [recipe/multifactorauth/types.ts:133](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L133) |
| `FactorIds.OTP_PHONE` | `readonly` | `"otp-phone"` | `"otp-phone"` | [recipe/multifactorauth/types.ts:134](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L134) |
| `FactorIds.THIRDPARTY` | `readonly` | `"thirdparty"` | `"thirdparty"` | [recipe/multifactorauth/types.ts:137](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L137) |
| `FactorIds.TOTP` | `readonly` | `"totp"` | `"totp"` | [recipe/multifactorauth/types.ts:138](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L138) |
| `FactorIds.WEBAUTHN` | `readonly` | `"webauthn"` | `"webauthn"` | [recipe/multifactorauth/types.ts:139](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/types.ts#L139) |
| <a id="member-default-multifactorauthclaim"></a> `MultiFactorAuthClaim` | `static` | `any` | `MultiFactorAuthRecipe.MultiFactorAuthClaim` | [recipe/multifactorauth/index.ts:33](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L33) |

#### Methods

##### getSecondaryFactors()

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

Defined in: [recipe/multifactorauth/index.ts:90](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L90)

###### Parameters

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

###### Returns

`any`

##### init()

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

Defined in: [recipe/multifactorauth/index.ts:36](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L36)

###### Parameters

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

###### Returns

`any`

##### redirectToFactor()

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

Defined in: [recipe/multifactorauth/index.ts:56](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L56)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `factorId`: `string`; `forceSetup?`: `boolean`; `navigate?`: [`Navigate`](types#navigate); `redirectBack?`: `boolean`; `stepUp?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.factorId` | `string` |
| `input.forceSetup?` | `boolean` |
| `input.navigate?` | [`Navigate`](types#navigate) |
| `input.redirectBack?` | `boolean` |
| `input.stepUp?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

##### redirectToFactorChooser()

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

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

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `navigate?`: [`Navigate`](types#navigate); `nextFactorOptions?`: `string`[]; `redirectBack?`: `boolean`; `stepUp?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.navigate?` | [`Navigate`](types#navigate) |
| `input.nextFactorOptions?` | `string`[] |
| `input.redirectBack?` | `boolean` |
| `input.stepUp?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`any`

##### resyncSessionAndFetchMFAInfo()

```ts check=false reason="Generated API signature"
static resyncSessionAndFetchMFAInfo(input?): Promise<{
  emails: Record<string, string[] | undefined>;
  factors: MFAFactorInfo;
  fetchResponse: Response;
  phoneNumbers: Record<string, string[] | undefined>;
  status: "OK";
}>;
```

Defined in: [recipe/multifactorauth/index.ts:40](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L40)

###### Parameters

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

###### Returns

`Promise`\<\{
  `emails`: `Record`\<`string`, `string`[] \| `undefined`\>;
  `factors`: `MFAFactorInfo`;
  `fetchResponse`: `Response`;
  `phoneNumbers`: `Record`\<`string`, `string`[] \| `undefined`\>;
  `status`: `"OK"`;
\}\>

## Variables

### getSecondaryFactors()

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

Defined in: [recipe/multifactorauth/index.ts:103](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L103)

#### Parameters

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

#### Returns

`any`

***

### init()

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

Defined in: [recipe/multifactorauth/index.ts:99](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L99)

#### Parameters

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

#### Returns

`any`

***

### MultiFactorAuthClaim

```ts check=false reason="Generated API signature"
const MultiFactorAuthClaim: any = MultiFactorAuthRecipe.MultiFactorAuthClaim;
```

Defined in: [recipe/multifactorauth/index.ts:105](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L105)

***

### MultiFactorAuthComponentsOverrideProvider

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

Defined in: [recipe/multifactorauth/index.ts:104](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L104)

***

### redirectToFactor()

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

Defined in: [recipe/multifactorauth/index.ts:101](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L101)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `factorId`: `string`; `forceSetup?`: `boolean`; `navigate?`: [`Navigate`](types#navigate); `redirectBack?`: `boolean`; `stepUp?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.factorId` | `string` |
| `input.forceSetup?` | `boolean` |
| `input.navigate?` | [`Navigate`](types#navigate) |
| `input.redirectBack?` | `boolean` |
| `input.stepUp?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

***

### redirectToFactorChooser()

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

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

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `navigate?`: [`Navigate`](types#navigate); `nextFactorOptions?`: `string`[]; `redirectBack?`: `boolean`; `stepUp?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.navigate?` | [`Navigate`](types#navigate) |
| `input.nextFactorOptions?` | `string`[] |
| `input.redirectBack?` | `boolean` |
| `input.stepUp?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`any`

***

### resyncSessionAndFetchMFAInfo()

```ts check=false reason="Generated API signature"
const resyncSessionAndFetchMFAInfo: (input?) => Promise<{
  emails: Record<string, string[] | undefined>;
  factors: MFAFactorInfo;
  fetchResponse: Response;
  phoneNumbers: Record<string, string[] | undefined>;
  status: "OK";
}> = Wrapper.resyncSessionAndFetchMFAInfo;
```

Defined in: [recipe/multifactorauth/index.ts:100](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/multifactorauth/index.ts#L100)

#### Parameters

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

#### Returns

`Promise`\<\{
  `emails`: `Record`\<`string`, `string`[] \| `undefined`\>;
  `factors`: `MFAFactorInfo`;
  `fetchResponse`: `Response`;
  `phoneNumbers`: `Record`\<`string`, `string`[] \| `undefined`\>;
  `status`: `"OK"`;
\}\>

## References

### FactorIds

Re-exports [FactorIds](recipe-multifactorauth-types#factorids)

***

### GetRedirectionURLContext

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

***

### OnHandleEventContext

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

***

### PreAPIHookContext

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

***

### RecipeInterface

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

***

### UserInput

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