RecipeInterface
RecipeInterface: { clearLoginAttemptInfo: any; consumeCode: any; createCode: any; doesPasswordlessUserEmailExist: any; doesPasswordlessUserPhoneNumberExist: any; getOAuthAuthorisationURL: any; getOAuthState: any; getPasswordlessLoginAttemptInfo: any; redirectToThirdPartyLogin: any; resendCode: any; setOAuthState: any; setPasswordlessLoginAttemptInfo: any; thirdPartySignInAndUp: any }
Type declaration
clearLoginAttemptInfo:function
- clearLoginAttemptInfo(): void | Promise<void>
Returns void | Promise<void>
consumeCode:function
- consumeCode(input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { config: PasswordlessConfig }) | ({ linkCode: string; preAuthSessionId: string } & { config: PasswordlessConfig })): 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: PasswordlessConfig }) | ({ linkCode: string; preAuthSessionId: string } & { config: PasswordlessConfig })
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: PasswordlessConfig }) | ({ phoneNumber: string } & { config: PasswordlessConfig })): 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: PasswordlessConfig }) | ({ phoneNumber: string } & { config: PasswordlessConfig })
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" }>
doesPasswordlessUserEmailExist:function
- doesPasswordlessUserEmailExist(input: { config: PasswordlessConfig; email: string }): Promise<boolean>
Parameters
input: { config: PasswordlessConfig; email: string }
config: PasswordlessConfig
email: string
Returns Promise<boolean>
doesPasswordlessUserPhoneNumberExist:function
- doesPasswordlessUserPhoneNumberExist(input: { config: PasswordlessConfig; phoneNumber: string }): Promise<boolean>
Parameters
input: { config: PasswordlessConfig; phoneNumber: string }
config: PasswordlessConfig
phoneNumber: string
Returns Promise<boolean>
getOAuthAuthorisationURL:function
- getOAuthAuthorisationURL(input: { config: TPConfig; thirdPartyId: string }): Promise<string>
Parameters
input: { config: TPConfig; thirdPartyId: string }
config: TPConfig
thirdPartyId: string
Returns Promise<string>
getOAuthState:function
- getOAuthState(): undefined | StateObject
Returns undefined | StateObject
getPasswordlessLoginAttemptInfo:function
- getPasswordlessLoginAttemptInfo(): 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 }
redirectToThirdPartyLogin:function
- redirectToThirdPartyLogin(input: { config: TPConfig; state?: StateObject; thirdPartyId: string }): Promise<{ status: "OK" | "ERROR" }>
Parameters
input: { config: TPConfig; state?: StateObject; thirdPartyId: string }
config: TPConfig
Optional state?: StateObject
thirdPartyId: string
Returns Promise<{ status: "OK" | "ERROR" }>
resendCode:function
- resendCode(input: { deviceId: string; preAuthSessionId: string } & { config: PasswordlessConfig }): Promise<{ status: "OK" | "RESTART_FLOW_ERROR" } | { message: string; status: "GENERAL_ERROR" }>
Parameters
input: { deviceId: string; preAuthSessionId: string } & { config: PasswordlessConfig }
Returns Promise<{ status: "OK" | "RESTART_FLOW_ERROR" } | { message: string; status: "GENERAL_ERROR" }>
setOAuthState:function
- setOAuthState(state: StateObject): void
setPasswordlessLoginAttemptInfo:function
- setPasswordlessLoginAttemptInfo(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>
thirdPartySignInAndUp:function
- thirdPartySignInAndUp(input: { config: TPConfig; thirdPartyId: string }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>
Parameters
input: { config: TPConfig; thirdPartyId: string }
config: TPConfig
thirdPartyId: string
Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>