Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-node/recipe/multifactorauth/types

References documentation for the supertokens-node/recipe/multifactorauth/types package

Type Aliases

APIInterface

type APIInterface = object;

Defined in: recipe/multifactorauth/types.ts

Properties

Property Type Defined in
resyncSessionAndFetchMFAInfoPUT | undefined | (input) => Promise< | { emails: Record<string, string[] | undefined>; factors: { allowedToSetup: string[]; alreadySetup: string[]; next: string[]; }; phoneNumbers: Record<string, string[] | undefined>; status: "OK"; } | GeneralErrorResponse> recipe/multifactorauth/types.ts

APIOptions

type APIOptions = object;

Defined in: recipe/multifactorauth/types.ts

Properties


GetAllAvailableSecondaryFactorIdsFromOtherRecipesFunc()

type GetAllAvailableSecondaryFactorIdsFromOtherRecipesFunc = (tenantConfig) => string[];

Defined in: recipe/multifactorauth/types.ts

Parameters

Parameter Type
tenantConfig TenantConfig

Returns

string[]


GetEmailsForFactorFromOtherRecipesFunc()

type GetEmailsForFactorFromOtherRecipesFunc = (user, sessionRecipeUserId) => 
  | {
  factorIdToEmailsMap: Record<string, string[]>;
  status: "OK";
}
  | {
  status: "UNKNOWN_SESSION_RECIPE_USER_ID";
};

Defined in: recipe/multifactorauth/types.ts

Parameters

Parameter Type
user User
sessionRecipeUserId RecipeUserId

Returns

| { factorIdToEmailsMap: Record<string, string[]>; status: "OK"; } | { status: "UNKNOWN_SESSION_RECIPE_USER_ID"; }


GetFactorsSetupForUserFromOtherRecipesFunc()

type GetFactorsSetupForUserFromOtherRecipesFunc = (user, userContext) => Promise<string[]>;

Defined in: recipe/multifactorauth/types.ts

Parameters

Parameter Type
user User
userContext UserContext

Returns

Promise<string[]>


GetPhoneNumbersForFactorsFromOtherRecipesFunc()

type GetPhoneNumbersForFactorsFromOtherRecipesFunc = (user, sessionRecipeUserId) => 
  | {
  factorIdToPhoneNumberMap: Record<string, string[]>;
  status: "OK";
}
  | {
  status: "UNKNOWN_SESSION_RECIPE_USER_ID";
};

Defined in: recipe/multifactorauth/types.ts

Parameters

Parameter Type
user User
sessionRecipeUserId RecipeUserId

Returns

| { factorIdToPhoneNumberMap: Record<string, string[]>; status: "OK"; } | { status: "UNKNOWN_SESSION_RECIPE_USER_ID"; }


MFAClaimValue

type MFAClaimValue = object;

Defined in: recipe/multifactorauth/types.ts

Properties

Property Type Defined in
c Record<string, number | undefined> recipe/multifactorauth/types.ts
v boolean recipe/multifactorauth/types.ts

MFARequirementList

type MFARequirementList = (
  | {
  oneOf: string[];
}
  | {
  allOfInAnyOrder: string[];
}
  | string)[];

Defined in: recipe/multifactorauth/types.ts


RecipeInterface

type RecipeInterface = object;

Defined in: recipe/multifactorauth/types.ts

Properties

Property Type Defined in
addToRequiredSecondaryFactorsForUser (input) => Promise<void> recipe/multifactorauth/types.ts
assertAllowedToSetupFactorElseThrowInvalidClaimError (input) => Promise<void> recipe/multifactorauth/types.ts
getFactorsSetupForUser (input) => Promise<string[]> recipe/multifactorauth/types.ts
getMFARequirementsForAuth (input) => | Promise<MFARequirementList> | MFARequirementList recipe/multifactorauth/types.ts
getRequiredSecondaryFactorsForUser (input) => Promise<string[]> recipe/multifactorauth/types.ts
markFactorAsCompleteInSession (input) => Promise<void> recipe/multifactorauth/types.ts
removeFromRequiredSecondaryFactorsForUser (input) => Promise<void> recipe/multifactorauth/types.ts

TypeInput

type TypeInput = object;

Defined in: recipe/multifactorauth/types.ts

Properties

Property Type Defined in
firstFactors? string[] recipe/multifactorauth/types.ts
override? object recipe/multifactorauth/types.ts
override.apis? (originalImplementation, builder) => APIInterface recipe/multifactorauth/types.ts
override.functions? (originalImplementation, builder) => RecipeInterface recipe/multifactorauth/types.ts

TypeNormalisedInput

type TypeNormalisedInput = object;

Defined in: recipe/multifactorauth/types.ts

Properties

Property Type Defined in
firstFactors? string[] recipe/multifactorauth/types.ts
override object recipe/multifactorauth/types.ts
override.apis (originalImplementation, builder) => APIInterface recipe/multifactorauth/types.ts
override.functions (originalImplementation, builder) => RecipeInterface recipe/multifactorauth/types.ts

Variables

FactorIds

const FactorIds: object;

Defined in: recipe/multifactorauth/types.ts

Type Declaration

Name Type Default value Defined in
EMAILPASSWORD string "emailpassword" recipe/multifactorauth/types.ts
LINK_EMAIL string "link-email" recipe/multifactorauth/types.ts
LINK_PHONE string "link-phone" recipe/multifactorauth/types.ts
OTP_EMAIL string "otp-email" recipe/multifactorauth/types.ts
OTP_PHONE string "otp-phone" recipe/multifactorauth/types.ts
THIRDPARTY string "thirdparty" recipe/multifactorauth/types.ts
TOTP string "totp" recipe/multifactorauth/types.ts
WEBAUTHN string "webauthn" recipe/multifactorauth/types.ts

API reference

API schema and response details