Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-web-js/recipe/emailpassword/types

References documentation for the supertokens-web-js/recipe/emailpassword/types package

Type Aliases

InputType

type InputType = AuthRecipeInputType<PreAndPostAPIHookAction> & UserInput;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts


NormalisedInputType

type NormalisedInputType = AuthRecipeNormalisedInputType<PreAndPostAPIHookAction> & object;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts

Type Declaration

Name Type Defined in
override object tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
override.functions() (originalImplementation, builder) => RecipeInterface tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts

PostAPIHookContext

type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts


PreAndPostAPIHookAction

type PreAndPostAPIHookAction = 
  | "EMAIL_PASSWORD_SIGN_UP"
  | "EMAIL_PASSWORD_SIGN_IN"
  | "SEND_RESET_PASSWORD_EMAIL"
  | "SUBMIT_NEW_PASSWORD"
  | "EMAIL_EXISTS";

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts


PreAPIHookContext

type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts


RecipeInterface

type RecipeInterface = object;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts

Properties

Property Type Description Defined in
doesEmailExist (input) => Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }> Check if an email exists Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
getResetPasswordTokenFromURL (input) => string Reads and returns the reset password token from the current URL tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
getTenantIdFromURL (input) => string | undefined Reads and returns the tenant id from the current URL tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
sendPasswordResetEmail (input) => Promise< | { fetchResponse: Response; status: "OK"; } | { fetchResponse: Response; reason: string; status: "PASSWORD_RESET_NOT_ALLOWED"; } | { fetchResponse: Response; formFields: object[]; status: "FIELD_ERROR"; }> Send an email to the user for password reset Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
signIn (input) => Promise< | { fetchResponse: Response; status: "OK"; user: User; } | { fetchResponse: Response; formFields: object[]; status: "FIELD_ERROR"; } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR"; } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED"; }> Sign in a user with email and password Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
signUp (input) => Promise< | { fetchResponse: Response; status: "OK"; user: User; } | { fetchResponse: Response; formFields: object[]; status: "FIELD_ERROR"; } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED"; }> Sign up a user with email and password Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
submitNewPassword (input) => Promise< | { fetchResponse: Response; status: "OK"; } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; } | { fetchResponse: Response; formFields: object[]; status: "FIELD_ERROR"; }> Submit a new password for the user Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts

UserInput

type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts

Type Declaration

Name Type Description Defined in
override? object Refer to the documentation tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts
override.functions()? (originalImplementation, builder) => RecipeInterface - tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts

API reference

API schema and response details