> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# loginWithPassword

[API Reference](/api-reference/modelence/client/functions/../../../index) / [modelence](/api-reference/modelence/client/functions/../../index) / [client](/api-reference/modelence/client/functions/../index) / loginWithPassword

> **loginWithPassword**(`options`): `Promise`\<`null` | `User`>

Defined in: [packages/modelence/src/auth/client/index.ts:72](https://github.com/modelence/modelence/blob/f614ecc6811cdda9670d612872c8ff49a49c5e28/packages/modelence/src/auth/client/index.ts#L72)

Login a user with an email and password.

## Example

```ts theme={null}
await loginWithPassword({ email: 'test@example.com', password: '12345678' });
```

## Parameters

| Parameter          | Type                                          | Description               |
| ------------------ | --------------------------------------------- | ------------------------- |
| `options`          | \{ `email`: `string`; `password`: `string`; } | -                         |
| `options.email`    | `string`                                      | The email of the user.    |
| `options.password` | `string`                                      | The password of the user. |

## Returns

`Promise`\<`null` | `User`>
