supertokens-web-js/recipe/passwordless/types
References documentation for the supertokens-web-js/recipe/passwordless/types package
Type Aliases
InputType
type InputType = RecipeConfig<PreAndPostAPIHookAction> & UserInput;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
NormalisedInputType
type NormalisedInputType = NormalisedRecipeConfig<PreAndPostAPIHookAction> & object;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
Type Declaration
| Name | Type | Defined in |
|---|---|---|
override |
object |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
override.functions() |
(originalImplementation, builder) => RecipeInterface |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
PasswordlessFlowType
type PasswordlessFlowType = "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK";
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
PostAPIHookContext
type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
PreAndPostAPIHookAction
type PreAndPostAPIHookAction =
| "PASSWORDLESS_CREATE_CODE"
| "PASSWORDLESS_CONSUME_CODE"
| "PASSWORDLESS_RESEND_CODE"
| "EMAIL_EXISTS"
| "PHONE_NUMBER_EXISTS";
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
PreAPIHookContext
type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
RecipeInterface
type RecipeInterface = object;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
clearLoginAttemptInfo |
(input) => Promise<void> |
Clear any information about login attempts from storage | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
consumeCode |
(input) => Promise< | { createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR"; } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }> |
Log the user in using the input code or link code Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
createCode |
(input) => Promise< | { deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK"; } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }> |
Create and send a code to the user for passwordless auth Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
doesEmailExist |
(input) => Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }> |
Check if a user with the given email exists Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
doesPhoneNumberExist |
(input) => Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }> |
Check if a user with the given phone number exists Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
getLinkCodeFromURL |
(input) => string |
Reads and returns the link code from the current URL | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
getLoginAttemptInfo |
<CustomLoginAttemptInfoProperties>(input) => Promise<undefined | object & CustomLoginAttemptInfoProperties> |
Get information about the current login attempt from storage | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
getPreAuthSessionIdFromURL |
(input) => string |
Reads and returns the pre auth session id from the current URL | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
getTenantIdFromURL |
(input) => string | undefined |
Reads and returns the tenant id from the current URL | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
resendCode |
(input) => Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR"; }> |
Resend the code to the user Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" |
tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
setLoginAttemptInfo |
<CustomStateProperties>(input) => Promise<void> |
Set information about the current login attempt to storage | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
UserInput
type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;
Defined in: tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
override? |
object |
Refer to the documentation | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |
override.functions()? |
(originalImplementation, builder) => RecipeInterface |
- | tmp/supertokens-web-js/lib/ts/recipe/passwordless/types.ts |