---
title: supertokens-web-js/recipe/emailpassword/types
description: References documentation for the supertokens-web-js/recipe/emailpassword/types package
sidebar:
  order: 40
---

## Type Aliases

### InputType

```ts check=false reason="Generated API signature"
type InputType = AuthRecipeInputType<PreAndPostAPIHookAction> & UserInput;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:51](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L51)

***

### NormalisedInputType

```ts check=false reason="Generated API signature"
type NormalisedInputType = AuthRecipeNormalisedInputType<PreAndPostAPIHookAction> & object;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:53](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L53)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `override` | `object` | [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:54](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L54) |
| `override.functions()` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:55](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L55) |

***

### PostAPIHookContext

```ts check=false reason="Generated API signature"
type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:37](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L37)

***

### PreAndPostAPIHookAction

```ts check=false reason="Generated API signature"
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](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L29)

***

### PreAPIHookContext

```ts check=false reason="Generated API signature"
type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:36](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L36)

***

### RecipeInterface

```ts check=false reason="Generated API signature"
type RecipeInterface = object;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:62](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L62)

#### Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="doesemailexist"></a> `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](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L259) |
| <a id="getresetpasswordtokenfromurl"></a> `getResetPasswordTokenFromURL` | (`input`) => `string` | Reads and returns the reset password token from the current URL | [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:272](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L272) |
| <a id="gettenantidfromurl"></a> `getTenantIdFromURL` | (`input`) => `string` \| `undefined` | Reads and returns the tenant id from the current URL | [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:281](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L281) |
| <a id="sendpasswordresetemail"></a> `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](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L121) |
| <a id="signin"></a> `signIn` | (`input`) => `Promise`\< \| \{ `fetchResponse`: `Response`; `status`: `"OK"`; `user`: [`User`](types#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](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L213) |
| <a id="signup"></a> `signUp` | (`input`) => `Promise`\< \| \{ `fetchResponse`: `Response`; `status`: `"OK"`; `user`: [`User`](types#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](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L165) |
| <a id="submitnewpassword"></a> `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](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L80) |

***

### UserInput

```ts check=false reason="Generated API signature"
type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;
```

Defined in: [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:39](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L39)

#### Type Declaration

| Name | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `override?` | `object` | Refer to [the documentation](https://supertokens.com/docs/references/frontend-sdks/function-overrides) | [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:43](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L43) |
| `override.functions()?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | - | [tmp/supertokens-web-js/lib/ts/recipe/emailpassword/types.ts:44](https://github.com/supertokens/supertokens-web-js/blob/be2e0fd7dcade8352cdc9639abe968e5cda5b1cd/lib/ts/recipe/emailpassword/types.ts#L44) |
