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

# Email authentication for your app

> Configure email sign-in for your app's built-in backend: confirmation, password rules, one-time codes, and sending limits.

> [!NOTE]
>
> This page documents email authentication settings for apps using the [built-in backend](https://docs.lovable.dev/features/cloud). Projects connected to your own Supabase project manage authentication in Supabase instead. For an overview of all sign-in methods and user management, see [Users and authentication](https://docs.lovable.dev/features/authentication).

Let users sign up for your app with an email address and password. When you ask Lovable to add login without naming a method, email sign-in is one of the methods it sets up, and Lovable builds the signup, login, and password reset flows. For example, tell Lovable:

```text wrap theme={null}
Add login to the app with email and password. Require login before accessing the dashboard.
```

To configure it, go to **More → Users → Settings → Email**.

## How email sign-in works for users

* **Signing up**: the user enters an email address and password. Unless auto-confirm is enabled, they receive a confirmation email and verify the address before they can sign in.
* **Signing in**: email and password, or a [passwordless flow](#passwordless-sign-in) if you build one.
* **Resetting a password**: the user requests a reset, receives a password reset email, and picks a new password.
* **Changing an email address**: with secure email change enabled, both the old and new address must confirm the change.

Every email in these flows can be sent from your own domain with your own branding. See [Custom emails](https://docs.lovable.dev/features/custom-emails.md).

## Passwordless sign-in

Email sign-in can also work without passwords. Ask Lovable in the project chat to build a magic link or one-time code flow instead:

```text wrap theme={null}
Let users sign in with a magic link sent to their email instead of a password.
```

The [One-time codes](#one-time-codes) settings control how long emailed codes and magic links stay valid, and how many digits codes have.

## Email confirmation

Two settings control how addresses are verified:

* **Auto-confirm email**: sign users in immediately without requiring them to confirm their email address. With auto-confirm disabled, users receive a confirmation email and must verify the address before signing in.
* **Secure email change**: require confirmation on both the old and new address when a user changes their email.

> [!TIP]
>
> Auto-confirm makes testing easier, but keep confirmation enabled for a live app. Without confirmation, anyone can sign up with an address they don't own.

## Password rules

Five settings control how strong passwords must be:

* **Minimum password length**: at least 6 characters. A minimum of 8 is recommended.
* **Required password characters**: which character types every password must include. The default, **No required characters**, adds no requirement beyond the minimum length. The stricter options are **Letters and numbers**, **Lowercase, uppercase, and numbers**, and **Lowercase, uppercase, numbers, and special characters**.
* **Password HIBP check**: reject known or easy-to-guess passwords using the Have I Been Pwned database of leaked passwords. Enabled by default on new projects.
* **Require re-authentication for password changes**: require a recent login before a password can be changed.
* **Require current password for password changes**: users enter their current password to set a new one. Enabled by default on new projects.

Stricter rules protect accounts but add signup friction. The HIBP check is the highest-value setting here: it blocks the passwords attackers try first, without making rules harder for everyone else.

## One-time codes

For login flows that email a one-time code instead of using a password:

* **Email OTP expiration (seconds)**: how long a code or magic link stays valid, from 60 seconds to 24 hours.
* **Email OTP length**: 6 to 8 digits.

## Sending limits

**Rate limit for sending emails**, found in **More → Users → Settings → Email → Advanced**, caps how many authentication emails your project sends per hour. New projects start at 1,000 emails per hour when the project's email sending is active. If your app signs up many users at once and confirmations stop arriving, this limit is the first thing to check.

To raise the limit above 1,000, for example before a launch, enter a higher value yourself, up to 32,767 emails per hour. When you ask in the project chat, Lovable can set the limit up to 1,000 emails per hour.

If Lovable says your project's email sending is not active, set up [custom emails](https://docs.lovable.dev/features/custom-emails.md) first. Until then, authentication emails go through a shared sender with its own strict limit, so a higher value does not get more emails delivered.

**Rate limit for sending emails** is the only authentication rate limit you can change in Lovable.

When your project sends authentication emails from your own domain, they also count toward your workspace's hourly limit for authentication emails, which depends on your plan. See [Custom emails](https://docs.lovable.dev/features/custom-emails.md#availability-and-usage).

## Troubleshooting

> [accordion] Users are not receiving confirmation emails
>
> Ask users to check their spam folder first, since emails from new domains often land there. If many signups happen at once, your project may have exceeded its [hourly email rate limit](#sending-limits). For better deliverability and branded senders, set up [custom emails](https://docs.lovable.dev/features/custom-emails.md).

> [accordion] Sign-in works in preview but fails on the published app
>
> The published URL or custom domain is probably missing from your project's redirect URLs. See [Site URL and redirect URLs](https://docs.lovable.dev/features/authentication#site-url-and-redirect-urls).

> [accordion] A user is stuck unconfirmed
>
> Their confirmation email may have expired or landed in spam. Signing in again does not resend it. To get a new confirmation email, the user signs up again with the same email address.
>
> You can also create the account for them: users added with **Add user → Create new user** in **More → Users** are confirmed automatically.

## FAQ

> [accordion] Should I turn on auto-confirm email?
>
> Auto-confirm is convenient while building and testing, because you can create accounts without checking an inbox. For a live app, keep confirmation enabled so every account belongs to a real, verified address.

> [accordion] Can users sign in without a password?
>
> Yes. Ask Lovable to build a magic link or one-time code flow: users receive an email and sign in without typing a password. The **One-time codes** settings control how long codes stay valid and how many digits they have.

> [accordion] Can I turn off email sign-in entirely?
>
> Yes. Disable it under **More → Users → Settings → Email**, for example if your app should only offer [Google](https://docs.lovable.dev/features/google-auth.md) or [SAML SSO](https://docs.lovable.dev/features/saml-sso.md) sign-in. Make sure at least one sign-in method stays enabled.

> [accordion] How do password resets work?
>
> Lovable generates the reset flow when it builds email sign-in: users request a reset, receive a password reset email, and choose a new password. You can customize the reset email under **More → Emails**.

> [accordion] Where do I customize the emails users receive?
>
> Signup confirmations, password resets, invites, and magic links are sent using your project's email templates. Set up sending from your own domain and preview each template under **More → Emails**. See [Custom emails](https://docs.lovable.dev/features/custom-emails.md).
