Skip to main content
References

MFA

Classes

default

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:22

Constructors

Constructor
new default(): default;
Returns

default

Properties

PropertyModifierTypeDefault valueDefined in
MultiFactorAuthClaimstaticMultiFactorAuthClaimClassRecipe.MultiFactorAuthClaimtmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:43

Methods

init()
static init(config?): CreateRecipeFunction<"GET_MFA_INFO">;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:23

Parameters
ParameterType
config?UserInput
Returns

CreateRecipeFunction<"GET_MFA_INFO">

resyncSessionAndFetchMFAInfo()
static resyncSessionAndFetchMFAInfo(input?): Promise<{
emails: Record<string, string[] | undefined>;
factors: MFAFactorInfo;
fetchResponse: Response;
phoneNumbers: Record<string, string[] | undefined>;
status: "OK";
}>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:36

Loads information about what factors the current session can set up/complete and updates the requirements in the session payload

Parameters
ParameterType
input?{ options?: RecipeFunctionOptions; userContext?: any; }
input.options?RecipeFunctionOptions
input.userContext?any
Returns

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

{ status: "OK", ...} if successful

MultiFactorAuthClaimClass

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts:8

We include "Class" in the class name, because it makes it easier to import/use the right thing (the instance exported by the recipe) instead of this.

Implements

Constructors

Constructor
new MultiFactorAuthClaimClass(getRecipeImpl): MultiFactorAuthClaimClass;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts:15

Parameters
ParameterType
getRecipeImpl() => RecipeInterface
Returns

MultiFactorAuthClaimClass

Properties

Methods

getLastFetchedTime()
getLastFetchedTime(payload, _userContext?): number;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts:138

Parameters
ParameterType
payloadany
_userContext?any
Returns

number

Implementation of

SessionClaim.getLastFetchedTime

getValueFromPayload()
getValueFromPayload(payload, _userContext?): object;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts:124

Parameters
ParameterType
payloadany
_userContext?any
Returns

object

Implementation of

SessionClaim.getValueFromPayload

refresh()
refresh(userContext): Promise<void>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts:120

Parameters
ParameterType
userContextany
Returns

Promise<void>

Implementation of

SessionClaim.refresh

Variables

init()

const init: (config?) => CreateRecipeFunction<"GET_MFA_INFO"> = RecipeWrapper.init;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:46

Parameters

ParameterType
config?UserInput

Returns

CreateRecipeFunction<"GET_MFA_INFO">

MultiFactorAuthClaim

const MultiFactorAuthClaim: MultiFactorAuthClaimClass = RecipeWrapper.MultiFactorAuthClaim;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:48

resyncSessionAndFetchMFAInfo()

const resyncSessionAndFetchMFAInfo: (input?) => Promise<{
emails: Record<string, string[] | undefined>;
factors: MFAFactorInfo;
fetchResponse: Response;
phoneNumbers: Record<string, string[] | undefined>;
status: "OK";
}> = RecipeWrapper.resyncSessionAndFetchMFAInfo;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts:47

Loads information about what factors the current session can set up/complete and updates the requirements in the session payload

Parameters

ParameterType
input?{ options?: RecipeFunctionOptions; userContext?: any; }
input.options?RecipeFunctionOptions
input.userContext?any

Returns

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

{ status: "OK", ...} if successful

References

PostAPIHookContext

Re-exports PostAPIHookContext

PreAndPostAPIHookAction

Re-exports PreAndPostAPIHookAction

PreAPIHookContext

Re-exports PreAPIHookContext

RecipeFunctionOptions

Re-exports RecipeFunctionOptions

RecipeInterface

Re-exports RecipeInterface

UserInput

Re-exports UserInput