Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-auth-react/recipe/passwordless/types

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

Type Aliases

AdditionalLoginAttemptInfoProperties

type AdditionalLoginAttemptInfoProperties = object;

Defined in: recipe/passwordless/types.ts

When calling getLoginAttemptInfo/setLoginAttemptInfo from web-js we use generics to get access to properties in local storage that web-js does not set by default. This allows us to strongly type the response while keeping it dynamic.

In the context of auth-react this type indicates all the additional properties we need.

Properties

Property Type Defined in
contactInfo string recipe/passwordless/types.ts
contactMethod "EMAIL" | "PHONE" recipe/passwordless/types.ts
lastResend number recipe/passwordless/types.ts
redirectToPath? string recipe/passwordless/types.ts

ComponentOverrideMap

type ComponentOverrideMap = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
PasswordlessContinueWithPasswordless_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessEmailForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessEmailOrPhoneForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessEPComboEmailForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessEPComboEmailOrPhoneForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessLinkClickedScreen_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessLinkSent_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessMFAFooter_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessMFAHeader_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessMFAOTPFooter_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessMFAOTPHeader_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessMFAOTPLoadingScreen_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessPhoneForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessUserInputCodeForm_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessUserInputCodeFormFooter_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts
PasswordlessUserInputCodeFormHeader_Override? ComponentOverride<typeof SuperTokensWrapper> recipe/passwordless/types.ts

Config

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

Defined in: recipe/passwordless/types.ts


GetRedirectionURLContext

type GetRedirectionURLContext = never;

Defined in: recipe/passwordless/types.ts


LinkClickedScreenProps

type LinkClickedScreenProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
config NormalisedConfig recipe/passwordless/types.ts
consumeCode () => void recipe/passwordless/types.ts
onSuccess? () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
requireUserInteraction boolean recipe/passwordless/types.ts

LinkSentChildProps

type LinkSentChildProps = LinkSentThemeProps;

Defined in: recipe/passwordless/types.ts


LinkSentThemeProps

type LinkSentThemeProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
loginAttemptInfo LoginAttemptInfo recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts

LoginAttemptInfo

type LoginAttemptInfo = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
contactInfo string recipe/passwordless/types.ts
contactMethod "EMAIL" | "PHONE" recipe/passwordless/types.ts
deviceId string recipe/passwordless/types.ts
flowType "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK" recipe/passwordless/types.ts
lastResend number recipe/passwordless/types.ts
preAuthSessionId string recipe/passwordless/types.ts
redirectToPath? string recipe/passwordless/types.ts

MFAAction

type MFAAction = 
  | {
  callingCreateCode: boolean;
  canChangeEmail: boolean;
  error: string | undefined;
  loginAttemptInfo: LoginAttemptInfo | undefined;
  showAccessDenied: boolean;
  showBackButton: boolean;
  type: "load";
}
  | {
  loginAttemptInfo: LoginAttemptInfo;
  type: "startVerify";
}
  | {
  timestamp: number;
  type: "resendCode";
}
  | {
  error: string | undefined;
  type: "restartFlow";
}
  | {
  error: string | undefined;
  showAccessDenied: boolean;
  type: "setError";
};

Defined in: recipe/passwordless/types.ts


MFAChildProps

type MFAChildProps = Omit<MFAProps, "featureState" | "dispatch">;

Defined in: recipe/passwordless/types.ts


MFAFooterProps

type MFAFooterProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
canChangeEmail boolean recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
onSignOutClicked () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts

MFAHeaderProps

type MFAHeaderProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
config NormalisedConfig recipe/passwordless/types.ts
contactMethod "EMAIL" | "PHONE" recipe/passwordless/types.ts
onBackButtonClicked () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
showBackButton boolean recipe/passwordless/types.ts

MFAOTPFooterProps

type MFAOTPFooterProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
canChangeEmail boolean recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
loginAttemptInfo LoginAttemptInfo recipe/passwordless/types.ts
onSignOutClicked () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts

MFAOTPHeaderProps

type MFAOTPHeaderProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
canChangeEmail boolean recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
loginAttemptInfo LoginAttemptInfo recipe/passwordless/types.ts
onBackButtonClicked () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
showBackButton boolean recipe/passwordless/types.ts

MFAProps

type MFAProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
config NormalisedConfig recipe/passwordless/types.ts
contactMethod "EMAIL" | "PHONE" recipe/passwordless/types.ts
dispatch Dispatch<MFAAction> recipe/passwordless/types.ts
featureState object recipe/passwordless/types.ts
featureState.canChangeEmail boolean recipe/passwordless/types.ts
featureState.error string | undefined recipe/passwordless/types.ts
featureState.loaded boolean recipe/passwordless/types.ts
featureState.loginAttemptInfo? LoginAttemptInfo recipe/passwordless/types.ts
featureState.showAccessDenied boolean recipe/passwordless/types.ts
featureState.showBackButton boolean recipe/passwordless/types.ts
onBackButtonClicked () => void recipe/passwordless/types.ts
onFetchError (err) => void recipe/passwordless/types.ts
onSignOutClicked () => void recipe/passwordless/types.ts
onSuccess? () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
userContext? UserContext recipe/passwordless/types.ts
validatePhoneNumber (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

MFAState

type MFAState = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
canChangeEmail boolean recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
loaded boolean recipe/passwordless/types.ts
loginAttemptInfo LoginAttemptInfo | undefined recipe/passwordless/types.ts
showAccessDenied boolean recipe/passwordless/types.ts
showBackButton boolean recipe/passwordless/types.ts

NormalisedConfig

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

Defined in: recipe/passwordless/types.ts

Type Declaration

Name Type Defined in
contactMethod "PHONE" | "EMAIL" | "EMAIL_OR_PHONE" recipe/passwordless/types.ts
linkClickedScreenFeature PasswordlessNormalisedBaseConfig recipe/passwordless/types.ts
mfaFeature PasswordlessNormalisedBaseConfig recipe/passwordless/types.ts
override object recipe/passwordless/types.ts
override.functions() (originalImplementation) => SuperTokensWrapper recipe/passwordless/types.ts
signInUpFeature object recipe/passwordless/types.ts
signInUpFeature.defaultCountry? string recipe/passwordless/types.ts
signInUpFeature.defaultToEmail boolean recipe/passwordless/types.ts
signInUpFeature.emailOrPhoneFormStyle string recipe/passwordless/types.ts
signInUpFeature.linkSentScreenStyle string recipe/passwordless/types.ts
signInUpFeature.resendEmailOrSMSGapInSeconds number recipe/passwordless/types.ts
signInUpFeature.userInputCodeFormStyle string recipe/passwordless/types.ts
validateEmailAddress() (email) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts
validatePhoneNumber()? (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

OnHandleEventContext

type OnHandleEventContext = 
  | {
  action: "SUCCESS";
  createdNewSession: boolean;
  isNewRecipeUser: boolean;
  user: SuperTokensWrapper;
}
  | {
  action: "PASSWORDLESS_RESTART_FLOW";
}
  | {
  action: "PASSWORDLESS_CODE_SENT";
  isResend: boolean;
}
  | AuthRecipeModuleOnHandleEventContext;

Defined in: recipe/passwordless/types.ts


PasswordlessFeatureBaseConfig

type PasswordlessFeatureBaseConfig = object & FeatureBaseConfig;

Defined in: recipe/passwordless/types.ts

Type Declaration

Name Type Defined in
disableDefaultUI? boolean recipe/passwordless/types.ts

PasswordlessNormalisedBaseConfig

type PasswordlessNormalisedBaseConfig = object & NormalisedBaseConfig;

Defined in: recipe/passwordless/types.ts

Type Declaration

Name Type Defined in
disableDefaultUI? boolean recipe/passwordless/types.ts

PreAndPostAPIHookAction

type PreAndPostAPIHookAction = 
  | "PASSWORDLESS_CREATE_CODE"
  | "PASSWORDLESS_CONSUME_CODE"
  | "PASSWORDLESS_RESEND_CODE"
  | "EMAIL_EXISTS"
  | "PHONE_NUMBER_EXISTS";

Defined in: recipe/passwordless/types.ts


PreAPIHookContext

type PreAPIHookContext = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
action PreAndPostAPIHookAction recipe/passwordless/types.ts
requestInit RequestInit recipe/passwordless/types.ts
url string recipe/passwordless/types.ts

RecipeImplementation

type RecipeImplementation = WebJSRecipeInterface<typeof SuperTokensWrapper>;

Defined in: recipe/passwordless/types.ts


SignInUpChildProps

type SignInUpChildProps = SignInUpProps;

Defined in: recipe/passwordless/types.ts


SignInUpEmailFormProps

type SignInUpEmailFormProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
onFetchError (error) => void recipe/passwordless/types.ts
onSuccess? () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts

SignInUpEmailOrPhoneFormProps

type SignInUpEmailOrPhoneFormProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
onFetchError (error) => void recipe/passwordless/types.ts
onSuccess? () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
validatePhoneNumber (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

SignInUpEPComboChildProps

type SignInUpEPComboChildProps = Omit<SignInUpProps, "onSuccess"> & object;

Defined in: recipe/passwordless/types.ts

Type Declaration

Name Type Defined in
isPhoneNumber boolean recipe/passwordless/types.ts
navigate Navigate | undefined recipe/passwordless/types.ts
onContactInfoSubmit() (contactInfo) => Promise<FormBaseAPIResponse<unknown>> recipe/passwordless/types.ts
onContinueWithPasswordlessClick() (contactInfo) => Promise<void> recipe/passwordless/types.ts
onPasswordSubmit() (formFields) => Promise<FormBaseAPIResponse<unknown>> recipe/passwordless/types.ts
onSuccess() (result) => void recipe/passwordless/types.ts
setIsPhoneNumber() (isPhone) => void recipe/passwordless/types.ts
showContinueWithPasswordlessLink boolean recipe/passwordless/types.ts
showPasswordField boolean recipe/passwordless/types.ts
validatePhoneNumber() (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

SignInUpEPComboEmailFormProps

type SignInUpEPComboEmailFormProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
navigate Navigate | undefined recipe/passwordless/types.ts
onContactInfoSubmit (contactInfo) => Promise<FormBaseAPIResponse<unknown>> recipe/passwordless/types.ts
onContinueWithPasswordlessClick (contactInfo) => Promise<void> recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
onFetchError (error) => void recipe/passwordless/types.ts
onPasswordSubmit (formFields) => Promise<FormBaseAPIResponse<unknown>> recipe/passwordless/types.ts
onSuccess (result) => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
showContinueWithPasswordlessLink boolean recipe/passwordless/types.ts
showPasswordField boolean recipe/passwordless/types.ts
validatePhoneNumber (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

SignInUpEPComboEmailOrPhoneFormProps

type SignInUpEPComboEmailOrPhoneFormProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
isPhoneNumber boolean recipe/passwordless/types.ts
navigate Navigate | undefined recipe/passwordless/types.ts
onContactInfoSubmit (contactInfo) => Promise<FormBaseAPIResponse<unknown>> recipe/passwordless/types.ts
onContinueWithPasswordlessClick (contactInfo) => Promise<void> recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
onFetchError (error) => void recipe/passwordless/types.ts
onPasswordSubmit (formFields) => Promise<FormBaseAPIResponse<unknown>> recipe/passwordless/types.ts
onSuccess (result) => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
setIsPhoneNumber (isPhone) => void recipe/passwordless/types.ts
showContinueWithPasswordlessLink boolean recipe/passwordless/types.ts
showPasswordField boolean recipe/passwordless/types.ts
validatePhoneNumber (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

SignInUpFeatureConfigInput

type SignInUpFeatureConfigInput = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
emailOrPhoneFormStyle? string recipe/passwordless/types.ts
linkSentScreenStyle? string recipe/passwordless/types.ts
resendEmailOrSMSGapInSeconds? number recipe/passwordless/types.ts
userInputCodeFormStyle? string recipe/passwordless/types.ts

SignInUpPhoneFormProps

type SignInUpPhoneFormProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
onFetchError (error) => void recipe/passwordless/types.ts
onSuccess? () => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
validatePhoneNumber (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

SignInUpProps

type SignInUpProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
factorIds string[] recipe/passwordless/types.ts
onError (err) => void recipe/passwordless/types.ts
onFetchError (err) => void recipe/passwordless/types.ts
onSuccess? (result) => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts
userContext UserContext recipe/passwordless/types.ts
validatePhoneNumber (phoneNumber) => Promise<string | undefined> | string | undefined recipe/passwordless/types.ts

SignInUpUserInputCodeFormProps

type SignInUpUserInputCodeFormProps = object;

Defined in: recipe/passwordless/types.ts

Properties

Property Type Defined in
clearError () => void recipe/passwordless/types.ts
config NormalisedConfig recipe/passwordless/types.ts
error string | undefined recipe/passwordless/types.ts
loginAttemptInfo LoginAttemptInfo recipe/passwordless/types.ts
onError (error) => void recipe/passwordless/types.ts
onFetchError (error) => void recipe/passwordless/types.ts
onSuccess? (result) => void recipe/passwordless/types.ts
recipeImplementation RecipeImplementation recipe/passwordless/types.ts

UserInput

type UserInput = 
  | {
  contactMethod: "EMAIL";
  signInUpFeature?: SignInUpFeatureConfigInput;
  validateEmailAddress?: (email) => Promise<string | undefined> | string | undefined;
}
  | {
  contactMethod: "PHONE";
  signInUpFeature?: SignInUpFeatureConfigInput & object;
  validatePhoneNumber?: (phoneNumber) => Promise<string | undefined> | string | undefined;
}
  | {
  contactMethod: "EMAIL_OR_PHONE";
  signInUpFeature?: SignInUpFeatureConfigInput & object;
  validateEmailAddress?: (email) => Promise<string | undefined> | string | undefined;
  validatePhoneNumber?: (phoneNumber) => Promise<string | undefined> | string | undefined;
} & object & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>;

Defined in: recipe/passwordless/types.ts

Type Declaration

Name Type Defined in
linkClickedScreenFeature? PasswordlessFeatureBaseConfig recipe/passwordless/types.ts
mfaFeature? PasswordlessFeatureBaseConfig recipe/passwordless/types.ts
override? object recipe/passwordless/types.ts
override.functions()? (originalImplementation) => SuperTokensWrapper recipe/passwordless/types.ts

UserInputCodeFormFooterProps

type UserInputCodeFormFooterProps = object;

Defined in: recipe/passwordless/types.ts

Properties


UserInputCodeFormHeaderProps

type UserInputCodeFormHeaderProps = object;

Defined in: recipe/passwordless/types.ts

Properties

API reference

API schema and response details