> ## 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](https://docs.modelence.com/api-reference/modelence/client/functions/../../../index) / [modelence](https://docs.modelence.com/api-reference/modelence/client/functions/../../index) / [client](https://docs.modelence.com/api-reference/modelence/client/functions/../index) / loginWithPassword

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

Defined in: [packages/modelence/src/auth/client/index.ts:106](https://github.com/modelence/modelence/blob/main/packages/modelence/src/auth/client/index.ts#L106)

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`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.