supertokens-web-js/recipe/multifactorauth
References documentation for the supertokens-web-js/recipe/multifactorauth package
Classes
default
Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts
Constructors
Constructor
new default(): default;
Returns
Properties
| Property | Modifier | Type | Default value | Defined in |
|---|---|---|---|---|
MultiFactorAuthClaim |
static |
MultiFactorAuthClaimClass |
Recipe.MultiFactorAuthClaim |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts |
Methods
init()
static init(config?): CreateRecipeFunction<"GET_MFA_INFO">;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts
Parameters
| Parameter | Type |
|---|---|
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
Loads information about what factors the current session can set up/complete and updates the requirements in the session payload
Parameters
| Parameter | Type |
|---|---|
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
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
Parameters
| Parameter | Type |
|---|---|
getRecipeImpl |
() => RecipeInterface |
Returns
Properties
| Property | Modifier | Type | Default value | Defined in |
|---|---|---|---|---|
getRecipeImpl |
protected |
() => RecipeInterface |
undefined |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
id |
public |
string |
"st-mfa" |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
validators |
public |
object |
undefined |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
validators.hasCompletedFactors |
public |
(requirements) => SessionClaimValidator |
undefined |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
validators.hasCompletedMFARequirementsForAuth |
public |
() => SessionClaimValidator |
undefined |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
Methods
getLastFetchedTime()
getLastFetchedTime(payload, _userContext?): number;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts
Parameters
| Parameter | Type |
|---|---|
payload |
any |
_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
Parameters
| Parameter | Type |
|---|---|
payload |
any |
_userContext? |
any |
Returns
object
| Name | Type | Defined in |
|---|---|---|
c |
Record<string, number | undefined> |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
v |
boolean |
tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts |
Implementation of
SessionClaim.getValueFromPayload
refresh()
refresh(userContext): Promise<void>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/multiFactorAuthClaim.ts
Parameters
| Parameter | Type |
|---|---|
userContext |
any |
Returns
Promise<void>
Implementation of
Variables
init()
const init: (config?) => CreateRecipeFunction<"GET_MFA_INFO"> = RecipeWrapper.init;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/multifactorauth/index.ts
Parameters
| Parameter | Type |
|---|---|
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
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
Loads information about what factors the current session can set up/complete and updates the requirements in the session payload
Parameters
| Parameter | Type |
|---|---|
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