Skip to main content
References

EmailPassword Types

Type Aliases

InputType

type InputType = AuthRecipeInputType<PreAndPostAPIHookAction> & UserInput;

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

NormalisedInputType

type NormalisedInputType = AuthRecipeNormalisedInputType<PreAndPostAPIHookAction> & object;

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

Type Declaration

PostAPIHookContext

type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;

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

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:29

PreAPIHookContext

type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;

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

RecipeInterface

type RecipeInterface = object;

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

Properties

PropertyTypeDescriptionDefined 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:259
getResetPasswordTokenFromURL(input) => stringReads and returns the reset password token from the current URLtmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:272
getTenantIdFromURL(input) => string | undefinedReads and returns the tenant id from the current URLtmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:281
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:121
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:213
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:165
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:80

UserInput

type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;

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

Type Declaration

NameTypeDescriptionDefined in
override?objectRefer to the documentationtmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:43
override.functions()?(originalImplementation, builder) => RecipeInterface-tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:44