Skip to main content
References

TOTP Types

Type Aliases

ComponentOverrideMap

type ComponentOverrideMap = object;

Defined in: recipe/totp/types.ts:35

Properties

PropertyTypeDefined in
TOTPBlockedScreen_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:36
TOTPCodeForm_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:38
TOTPCodeVerificationFooter_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:39
TOTPCodeVerificationHeader_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:40
TOTPDeviceInfoSection_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:43
TOTPDeviceSetupFooter_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:41
TOTPDeviceSetupHeader_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:42
TOTPLoadingScreen_Override?ComponentOverride<typeof SuperTokensWrapper>recipe/totp/types.ts:37

Config

type Config = UserInput & RecipeModuleConfig<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>;

Defined in: recipe/totp/types.ts:142

GetRedirectionURLContext

type GetRedirectionURLContext = never;

Defined in: recipe/totp/types.ts:157

NormalisedConfig

type NormalisedConfig = object & NormalisedRecipeModuleConfig<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>;

Defined in: recipe/totp/types.ts:145

Type Declaration

NameTypeDefined in
overrideobjectrecipe/totp/types.ts:148
override.functions()(originalImplementation, builder?) => SuperTokensWrapperrecipe/totp/types.ts:149
totpMFAScreenTOTPMFAScreenConfigrecipe/totp/types.ts:146

OnHandleEventContext

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

PreAndPostAPIHookAction

type PreAndPostAPIHookAction = 
| "CREATE_DEVICE"
| "VERIFY_CODE"
| "VERIFY_DEVICE"
| "REMOVE_DEVICE"
| "LIST_DEVICES";

Defined in: recipe/totp/types.ts:159

PreAPIHookContext

type PreAPIHookContext = object;

Defined in: recipe/totp/types.ts:166

Properties

TOTPDeviceInfo

type TOTPDeviceInfo = object;

Defined in: recipe/totp/types.ts:46

Properties

PropertyTypeDefined in
deviceNamestringrecipe/totp/types.ts:47
qrCodeStringstringrecipe/totp/types.ts:49
secretstringrecipe/totp/types.ts:48
userIdentifier?stringrecipe/totp/types.ts:50

TOTPMFAAction

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

TOTPMFAChildProps

type TOTPMFAChildProps = Omit<TOTPMFAProps, "featureState" | "dispatch">;

Defined in: recipe/totp/types.ts:121

TOTPMFACommonProps

type TOTPMFACommonProps = object;

Defined in: recipe/totp/types.ts:102

Properties

TOTPMFAProps

type TOTPMFAProps = object;

Defined in: recipe/totp/types.ts:109

Properties

PropertyTypeDefined in
configNormalisedConfigrecipe/totp/types.ts:111
dispatchDispatch<TOTPMFAAction>recipe/totp/types.ts:117
featureStateTOTPMFAStaterecipe/totp/types.ts:118
onBackButtonClicked() => voidrecipe/totp/types.ts:114
onRetryClicked() => voidrecipe/totp/types.ts:115
onShowSecretClicked() => voidrecipe/totp/types.ts:113
onSignOutClicked() => voidrecipe/totp/types.ts:116
onSuccess() => voidrecipe/totp/types.ts:112
recipeImplementationSuperTokensWrapperrecipe/totp/types.ts:110
userContext?UserContextrecipe/totp/types.ts:119

TOTPMFAScreenConfig

type TOTPMFAScreenConfig = object;

Defined in: recipe/totp/types.ts:123

Properties

PropertyTypeDefined in
blockedScreenStylestringrecipe/totp/types.ts:127
disableDefaultUIbooleanrecipe/totp/types.ts:124
loadingScreenStylestringrecipe/totp/types.ts:128
setupScreenStylestringrecipe/totp/types.ts:125
verificationScreenStylestringrecipe/totp/types.ts:126

TOTPMFAState

type TOTPMFAState = object;

Defined in: recipe/totp/types.ts:89

Properties

PropertyTypeDefined in
currAttemptCount?numberrecipe/totp/types.ts:98
deviceInfo?TOTPDeviceInforecipe/totp/types.ts:90
errorstring | undefinedrecipe/totp/types.ts:96
isBlockedbooleanrecipe/totp/types.ts:93
loadedbooleanrecipe/totp/types.ts:95
maxAttemptCount?numberrecipe/totp/types.ts:97
nextRetryAt?numberrecipe/totp/types.ts:92
showAccessDeniedbooleanrecipe/totp/types.ts:99
showBackButtonbooleanrecipe/totp/types.ts:94
showSecretbooleanrecipe/totp/types.ts:91

UserInput

type UserInput = object & RecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>;

Defined in: recipe/totp/types.ts:131

Type Declaration

NameTypeDefined in
override?objectrecipe/totp/types.ts:134
override.functions()?(originalImplementation, builder?) => SuperTokensWrapperrecipe/totp/types.ts:135
totpMFAScreen?Partial<TOTPMFAScreenConfig>recipe/totp/types.ts:132