Type aliases
GetRedirectionURLContext
GetRedirectionURLContext: AuthRecipeModuleGetRedirectionURLContext
OnHandleEventContext
OnHandleEventContext: { action: "SUCCESS"; isNewUser: boolean; user: PasswordlessUser } | { action: "PASSWORDLESS_RESTART_FLOW" } | { action: "PASSWORDLESS_CODE_SENT"; isResend: boolean } | AuthRecipeModuleOnHandleEventContext
PreAPIHookContext
PreAPIHookContext: { action: "PASSWORDLESS_CREATE_CODE" | "PASSWORDLESS_CONSUME_CODE" | "PASSWORDLESS_RESEND_CODE" | "EMAIL_EXISTS" | "PHONE_NUMBER_EXISTS"; requestInit: RequestInit; url: string }
Type declaration
action: "PASSWORDLESS_CREATE_CODE" | "PASSWORDLESS_CONSUME_CODE" | "PASSWORDLESS_RESEND_CODE" | "EMAIL_EXISTS" | "PHONE_NUMBER_EXISTS"
requestInit: RequestInit
url: string
RecipeInterface
RecipeInterface: { clearLoginAttemptInfo: any; consumeCode: any; createCode: any; doesEmailExist: any; doesPhoneNumberExist: any; getLoginAttemptInfo: any; resendCode: any; setLoginAttemptInfo: any }
Type declaration
clearLoginAttemptInfo:function
- clearLoginAttemptInfo(): void | Promise<void>
Returns void | Promise<void>
consumeCode:function
- consumeCode(input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { config: NormalisedConfig }) | ({ linkCode: string; preAuthSessionId: string } & { config: NormalisedConfig })): Promise<{ createdUser: boolean; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { message: string; status: "GENERAL_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
Parameters
input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { config: NormalisedConfig }) | ({ linkCode: string; preAuthSessionId: string } & { config: NormalisedConfig })
Returns Promise<{ createdUser: boolean; status: "OK"; user: PasswordlessUser } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { message: string; status: "GENERAL_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
createCode:function
- createCode(input: ({ email: string } & { config: NormalisedConfig }) | ({ phoneNumber: string } & { config: NormalisedConfig })): Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | { message: string; status: "GENERAL_ERROR" }>
Parameters
input: ({ email: string } & { config: NormalisedConfig }) | ({ phoneNumber: string } & { config: NormalisedConfig })
Returns Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | { message: string; status: "GENERAL_ERROR" }>
doesEmailExist:function
- doesEmailExist(input: { config: NormalisedConfig; email: string }): Promise<boolean>
Parameters
input: { config: NormalisedConfig; email: string }
config: NormalisedConfig
email: string
Returns Promise<boolean>
doesPhoneNumberExist:function
- doesPhoneNumberExist(input: { config: NormalisedConfig; phoneNumber: string }): Promise<boolean>
Parameters
input: { config: NormalisedConfig; phoneNumber: string }
config: NormalisedConfig
phoneNumber: string
Returns Promise<boolean>
getLoginAttemptInfo:function
- getLoginAttemptInfo(): undefined | Promise<undefined | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }> | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }
Returns undefined | Promise<undefined | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }> | { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }
resendCode:function
- resendCode(input: { deviceId: string; preAuthSessionId: string } & { config: NormalisedConfig }): Promise<{ status: "OK" | "RESTART_FLOW_ERROR" } | { message: string; status: "GENERAL_ERROR" }>
Parameters
input: { deviceId: string; preAuthSessionId: string } & { config: NormalisedConfig }
Returns Promise<{ status: "OK" | "RESTART_FLOW_ERROR" } | { message: string; status: "GENERAL_ERROR" }>
setLoginAttemptInfo:function
- setLoginAttemptInfo(input: { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }): void | Promise<void>
Parameters
input: { contactInfo: string; contactMethod: "EMAIL" | "PHONE"; deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; lastResend: number; preAuthSessionId: string; redirectToPath?: string }
contactInfo: string
contactMethod: "EMAIL" | "PHONE"
deviceId: string
flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"
lastResend: number
preAuthSessionId: string
Optional redirectToPath?: string
Returns void | Promise<void>
UserInput
User
Input: ({ contactMethod: "EMAIL"; signInUpFeature?: SignInUpFeatureConfigInput; validateEmailAddress?: any } | { contactMethod: "PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: CountryCode }; validatePhoneNumber?: any } | { contactMethod: "EMAIL_OR_PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: CountryCode; guessInternationPhoneNumberFromInputPhoneNumber?: any }; validateEmailAddress?: any; validatePhoneNumber?: any }) & { linkClickedScreenFeature?: PasswordlessFeatureBaseConfig; override?: { components?: ComponentOverrideMap; functions?: any } } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAPIHookContext, OnHandleEventContext>