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

# Password Authentication

> Configure email and password authentication with Prelude Auth.

This guide walks you through configuring email and password authentication for your application using Prelude Auth.

## Prerequisites

Before you start, make sure you have:

* A Prelude account with access to Prelude Auth
* An **Application ID** (`appID`): see [Applications](https://docs.prelude.so/auth/documentation/applications.md)
* Your **Management API key** for backend calls

## Set up password authentication

Configure password authentication for your application using the Management API from your backend.

**1. Create a password configuration**

```bash theme={null}
curl -X POST https://api.prelude.dev/v2/session/apps/${APP_ID}/config/login/password \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "rate_limit_login_ip": {
      "ttl": 600000000000,
      "limit": 10
    },
    "rate_limit_login_identifier": {
      "ttl": 600000000000,
      "limit": 10
    },
    "password_compliancy": {
      "min_length": 8,
      "max_length": 128,
      "uppercase": 1,
      "lowercase": 1,
      "numbers": 1,
      "symbols": 1
    }
  }'
```

| Field | Description |
| - | - |
| `hash_method` | The hashing algorithm for passwords. Default `argon2id`. |
| `rate_limit_login_ip` | Rate limit per IP address. `ttl` is in nanoseconds (600000000000 = 10 minutes). |
| `rate_limit_login_identifier` | Rate limit per identifier (e.g. email). Same format as above. |
| `password_compliancy` | Password requirements your users must meet. Adjust these values to match your security policy. |

**2. Create a user with an email identifier**

Create a user with an email identifier:

```bash theme={null}
curl -X POST https://api.prelude.dev/v2/session/apps/${APP_ID}/users \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "identifiers": [
      {
        "type": "email_address",
        "value": "user@example.com"
      }
    ]
  }'
```

**3. Set the user's password**

Set a password for the newly created user:

```bash theme={null}
curl -X PUT https://api.prelude.dev/v2/session/apps/${APP_ID}/users/${USER_ID}/password \
  -H "Authorization: Bearer ${MANAGEMENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "password": "Prelude123*"
  }'
```

## What's next?

Now that your backend is configured, integrate the frontend using the [Web Integration](https://docs.prelude.so/session/documentation/frontend-sdks/web/password.md) guide and login the newly created user.


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