---
title: supertokens-auth-react/recipe/emailpassword
description: References documentation for the supertokens-auth-react/recipe/emailpassword package
sidebar:
  order: 30
---

## Classes

### default

Defined in: [recipe/emailpassword/index.ts:29](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L29)

#### Constructors

##### Constructor

```ts check=false reason="Generated API signature"
new default(): default;
```

###### Returns

[`default`](#default)

#### Properties

| Property | Modifier | Type | Default value | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| <a id="componentsoverrideprovider"></a> `ComponentsOverrideProvider` | `static` | `any` | `RecipeComponentsOverrideContextProvider` | [recipe/emailpassword/index.ts:192](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L192) |

#### Methods

##### doesEmailExist()

```ts check=false reason="Generated API signature"
static doesEmailExist(input): Promise<{
  doesExist: boolean;
  fetchResponse: Response;
  status: "OK";
}>;
```

Defined in: [recipe/emailpassword/index.ts:170](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L170)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `email`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.email` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<\{
  `doesExist`: `boolean`;
  `fetchResponse`: `Response`;
  `status`: `"OK"`;
\}\>

##### getResetPasswordTokenFromURL()

```ts check=false reason="Generated API signature"
static getResetPasswordTokenFromURL(input?): string;
```

Defined in: [recipe/emailpassword/index.ts:185](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L185)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`string`

##### init()

```ts check=false reason="Generated API signature"
static init(config?): any;
```

Defined in: [recipe/emailpassword/index.ts:30](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L30)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `config?` | [`UserInput`](recipe-emailpassword-types#userinput) |

###### Returns

`any`

##### sendPasswordResetEmail()

```ts check=false reason="Generated API signature"
static sendPasswordResetEmail(input): Promise<
  | {
  fetchResponse: Response;
  status: "OK" | "PASSWORD_RESET_NOT_ALLOWED";
}
  | {
  fetchResponse: Response;
  formFields: object[];
  status: "FIELD_ERROR";
}>;
```

Defined in: [recipe/emailpassword/index.ts:71](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L71)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"OK"` \| `"PASSWORD_RESET_NOT_ALLOWED"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `formFields`: `object`[];
  `status`: `"FIELD_ERROR"`;
\}\>

##### signIn()

```ts check=false reason="Generated API signature"
static 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";
}>;
```

Defined in: [recipe/emailpassword/index.ts:132](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L132)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `shouldTryLinkingWithSessionUser?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.shouldTryLinkingWithSessionUser?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`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"`;
\}\>

##### signOut()

```ts check=false reason="Generated API signature"
static signOut(input?): Promise<void>;
```

Defined in: [recipe/emailpassword/index.ts:34](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L34)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<`void`\>

##### signUp()

```ts check=false reason="Generated API signature"
static 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";
}>;
```

Defined in: [recipe/emailpassword/index.ts:98](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L98)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `shouldTryLinkingWithSessionUser?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.shouldTryLinkingWithSessionUser?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"OK"`;
  `user`: `User`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `formFields`: `object`[];
  `status`: `"FIELD_ERROR"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `reason`: `string`;
  `status`: `"SIGN_UP_NOT_ALLOWED"`;
\}\>

##### submitNewPassword()

```ts check=false reason="Generated API signature"
static submitNewPassword(input): Promise<
  | {
  fetchResponse: Response;
  status: "OK";
}
  | {
  fetchResponse: Response;
  status: "RESET_PASSWORD_INVALID_TOKEN_ERROR";
}
  | {
  fetchResponse: Response;
  formFields: object[];
  status: "FIELD_ERROR";
}>;
```

Defined in: [recipe/emailpassword/index.ts:40](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L40)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

###### Returns

`Promise`\<
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"OK"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"RESET_PASSWORD_INVALID_TOKEN_ERROR"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `formFields`: `object`[];
  `status`: `"FIELD_ERROR"`;
\}\>

## Variables

### doesEmailExist()

```ts check=false reason="Generated API signature"
const doesEmailExist: (input) => Promise<{
  doesExist: boolean;
  fetchResponse: Response;
  status: "OK";
}> = Wrapper.doesEmailExist;
```

Defined in: [recipe/emailpassword/index.ts:201](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L201)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `email`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.email` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<\{
  `doesExist`: `boolean`;
  `fetchResponse`: `Response`;
  `status`: `"OK"`;
\}\>

***

### EmailPasswordComponentsOverrideProvider

```ts check=false reason="Generated API signature"
const EmailPasswordComponentsOverrideProvider: any = Wrapper.ComponentsOverrideProvider;
```

Defined in: [recipe/emailpassword/index.ts:203](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L203)

***

### getResetPasswordTokenFromURL()

```ts check=false reason="Generated API signature"
const getResetPasswordTokenFromURL: (input?) => string = Wrapper.getResetPasswordTokenFromURL;
```

Defined in: [recipe/emailpassword/index.ts:202](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L202)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`string`

***

### init()

```ts check=false reason="Generated API signature"
const init: (config?) => any = Wrapper.init;
```

Defined in: [recipe/emailpassword/index.ts:195](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L195)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `config?` | [`UserInput`](recipe-emailpassword-types#userinput) |

#### Returns

`any`

***

### sendPasswordResetEmail()

```ts check=false reason="Generated API signature"
const sendPasswordResetEmail: (input) => Promise<
  | {
  fetchResponse: Response;
  status: "OK" | "PASSWORD_RESET_NOT_ALLOWED";
}
  | {
  fetchResponse: Response;
  formFields: object[];
  status: "FIELD_ERROR";
}> = Wrapper.sendPasswordResetEmail;
```

Defined in: [recipe/emailpassword/index.ts:198](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L198)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"OK"` \| `"PASSWORD_RESET_NOT_ALLOWED"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `formFields`: `object`[];
  `status`: `"FIELD_ERROR"`;
\}\>

***

### signIn()

```ts check=false reason="Generated API signature"
const 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";
}> = Wrapper.signIn;
```

Defined in: [recipe/emailpassword/index.ts:200](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L200)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `shouldTryLinkingWithSessionUser?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.shouldTryLinkingWithSessionUser?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`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"`;
\}\>

***

### signOut()

```ts check=false reason="Generated API signature"
const signOut: (input?) => Promise<void> = Wrapper.signOut;
```

Defined in: [recipe/emailpassword/index.ts:196](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L196)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<`void`\>

***

### signUp()

```ts check=false reason="Generated API signature"
const 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";
}> = Wrapper.signUp;
```

Defined in: [recipe/emailpassword/index.ts:199](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L199)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `shouldTryLinkingWithSessionUser?`: `boolean`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.shouldTryLinkingWithSessionUser?` | `boolean` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"OK"`;
  `user`: `User`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `formFields`: `object`[];
  `status`: `"FIELD_ERROR"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `reason`: `string`;
  `status`: `"SIGN_UP_NOT_ALLOWED"`;
\}\>

***

### submitNewPassword()

```ts check=false reason="Generated API signature"
const submitNewPassword: (input) => Promise<
  | {
  fetchResponse: Response;
  status: "OK";
}
  | {
  fetchResponse: Response;
  status: "RESET_PASSWORD_INVALID_TOKEN_ERROR";
}
  | {
  fetchResponse: Response;
  formFields: object[];
  status: "FIELD_ERROR";
}> = Wrapper.submitNewPassword;
```

Defined in: [recipe/emailpassword/index.ts:197](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/emailpassword/index.ts#L197)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `input` | \{ `formFields`: `object`[]; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types#usercontext); \} |
| `input.formFields` | `object`[] |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types#usercontext) |

#### Returns

`Promise`\<
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"OK"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `status`: `"RESET_PASSWORD_INVALID_TOKEN_ERROR"`;
\}
  \| \{
  `fetchResponse`: `Response`;
  `formFields`: `object`[];
  `status`: `"FIELD_ERROR"`;
\}\>

## References

### GetRedirectionURLContext

Re-exports [GetRedirectionURLContext](recipe-emailpassword-types#getredirectionurlcontext)

***

### OnHandleEventContext

Re-exports [OnHandleEventContext](recipe-emailpassword-types#onhandleeventcontext)

***

### PreAPIHookContext

Re-exports [PreAPIHookContext](recipe-emailpassword-types#preapihookcontext)

***

### RecipeInterface

Renames and re-exports [SuperTokensWrapper](index#supertokenswrapper-1)

***

### UserInput

Re-exports [UserInput](recipe-emailpassword-types#userinput)
