Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-auth-react/recipe/totp/types

References documentation for the supertokens-auth-react/recipe/totp/types package

Type Aliases

ComponentOverrideMap

type ComponentOverrideMap = object;

Defined in: recipe/totp/types.ts

Properties

Property Type Defined in
TOTPBlockedScreen_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPCodeForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPCodeVerificationFooter_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPCodeVerificationHeader_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPDeviceInfoSection_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPDeviceSetupFooter_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPDeviceSetupHeader_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts
TOTPLoadingScreen_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/totp/types.ts

Config

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

Defined in: recipe/totp/types.ts


GetRedirectionURLContext

type GetRedirectionURLContext = never;

Defined in: recipe/totp/types.ts


NormalisedConfig

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

Defined in: recipe/totp/types.ts

Type Declaration

Name Type Defined in
override object recipe/totp/types.ts
override.functions() (originalImplementation, builder?) => SuperTokensWrapper recipe/totp/types.ts
totpMFAScreen TOTPMFAScreenConfig recipe/totp/types.ts

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


PreAndPostAPIHookAction

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

Defined in: recipe/totp/types.ts


PreAPIHookContext

type PreAPIHookContext = object;

Defined in: recipe/totp/types.ts

Properties

Property Type Defined in
action PreAndPostAPIHookAction recipe/totp/types.ts
requestInit RequestInit recipe/totp/types.ts
url string recipe/totp/types.ts
userContext UserContext recipe/totp/types.ts

TOTPDeviceInfo

type TOTPDeviceInfo = object;

Defined in: recipe/totp/types.ts

Properties

Property Type Defined in
deviceName string recipe/totp/types.ts
qrCodeString string recipe/totp/types.ts
secret string recipe/totp/types.ts
userIdentifier? string recipe/totp/types.ts

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


TOTPMFAChildProps

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

Defined in: recipe/totp/types.ts


TOTPMFACommonProps

type TOTPMFACommonProps = object;

Defined in: recipe/totp/types.ts

Properties


TOTPMFAProps

type TOTPMFAProps = object;

Defined in: recipe/totp/types.ts

Properties

Property Type Defined in
config NormalisedConfig recipe/totp/types.ts
dispatch Dispatch<TOTPMFAAction> recipe/totp/types.ts
featureState TOTPMFAState recipe/totp/types.ts
onBackButtonClicked () => void recipe/totp/types.ts
onRetryClicked () => void recipe/totp/types.ts
onShowSecretClicked () => void recipe/totp/types.ts
onSignOutClicked () => void recipe/totp/types.ts
onSuccess () => void recipe/totp/types.ts
recipeImplementation SuperTokensWrapper recipe/totp/types.ts
userContext? UserContext recipe/totp/types.ts

TOTPMFAScreenConfig

type TOTPMFAScreenConfig = object;

Defined in: recipe/totp/types.ts

Properties

Property Type Defined in
blockedScreenStyle string recipe/totp/types.ts
disableDefaultUI boolean recipe/totp/types.ts
loadingScreenStyle string recipe/totp/types.ts
setupScreenStyle string recipe/totp/types.ts
verificationScreenStyle string recipe/totp/types.ts

TOTPMFAState

type TOTPMFAState = object;

Defined in: recipe/totp/types.ts

Properties

Property Type Defined in
currAttemptCount? number recipe/totp/types.ts
deviceInfo? TOTPDeviceInfo recipe/totp/types.ts
error string | undefined recipe/totp/types.ts
isBlocked boolean recipe/totp/types.ts
loaded boolean recipe/totp/types.ts
maxAttemptCount? number recipe/totp/types.ts
nextRetryAt? number recipe/totp/types.ts
showAccessDenied boolean recipe/totp/types.ts
showBackButton boolean recipe/totp/types.ts
showSecret boolean recipe/totp/types.ts

UserInput

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

Defined in: recipe/totp/types.ts

Type Declaration

Name Type Defined in
override? object recipe/totp/types.ts
override.functions()? (originalImplementation, builder?) => SuperTokensWrapper recipe/totp/types.ts
totpMFAScreen? Partial<TOTPMFAScreenConfig> recipe/totp/types.ts

API reference

API schema and response details