Files
supabase/apps/docs/content/guides/auth/rate-limits.mdx
Miranda Limonczenko be2763610c docs: split Auth rate limits into a reference page and two how-to guides (#54485)
Closes DOCS-1619

## Problem

Auth rate limits mixes a lookup table with two procedures, so it doesn't
fit the reference template.

## Solution

- Make `auth/rate-limits` a reference page titled `Auth rate limits`.
The `#ip-address-forwarding` anchor that Studio links to stays.
- Move the procedures, unchanged, to two new how-to guides: Change Auth
rate limits and Forward end-user IP addresses.
- Group the three pages under Rate Limits in the navigation.

## Preview links

| Page | Live | Preview |
| --- | --- | --- |
| Auth rate limits |
[Live](https://supabase.com/docs/guides/auth/rate-limits) |
[Preview](https://docs-git-docs-auth-rate-limits-reference-supabase.vercel.app/docs/guides/auth/rate-limits)
|
| Change Auth rate limits | New |
[Preview](https://docs-git-docs-auth-rate-limits-reference-supabase.vercel.app/docs/guides/auth/rate-limits/change)
|
| Forward end-user IP addresses | New |
[Preview](https://docs-git-docs-auth-rate-limits-reference-supabase.vercel.app/docs/guides/auth/rate-limits/ip-forwarding)
|

## Review category (docs PRs only)

<!--
If this PR changes docs and you're on the Supabase team, select one
category.
PRs from forks are always reviewed as Low, so you can skip this section.
-->

- [ ] Critical: needs a review as soon as possible
- [ ] Urgent: the feature ships soon, or it's blocking something else
- [ ] Moderate: good to have soon, not urgent
- [ ] Low: get to it when you can

## Review instructions

1. Open the Auth rate limits preview. The sidebar shows Limits, Change
limits, and Forward end-user IPs under **Rate Limits**.
2. Open the preview at `#ip-address-forwarding`. The page scrolls to
that section.

## Checklist

Check all before review:

- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-12-04 14:45:07 -08:00

46 lines
2.7 KiB
Plaintext

---
title: 'Auth rate limits'
description: 'Look up the rate limits Supabase Auth applies to each endpoint, including emails, SMS, sign-ins, OTPs, token requests, and MFA, and how each limit is counted.'
---
Look up the rate limit on a Supabase Auth endpoint, and whether you can change it. Check this page when Supabase Auth returns any of the following:
- A `429 Too Many Requests` status code
- An `over_request_rate_limit`, `over_email_send_rate_limit`, or `over_sms_send_rate_limit` error code
To change a limit, see [Change Auth rate limits](/docs/guides/auth/rate-limits/change).
## Limits by endpoint
The following table lists each limit, what it's counted by, and whether you can change it.
<$Partial path="auth_rate_limits.mdx" />
## Rate limit behavior
The following notes apply to the limits in the table:
- Endpoint operations limited by IP address use a token bucket algorithm. The rate limit defines the rate at which the bucket is refilled.
- Most buckets have a maximum capacity of 30 requests, so a client that has been idle can send a brief burst of up to 30 requests. [Anonymous sign-ins](/docs/guides/auth/auth-anonymous) are an exception: the bucket capacity matches the configured number of anonymous sign-ins per hour.
- Once a bucket empties, requests are rate limited until tokens refill. Sustained requests above the rate limit are denied with a **429 Too Many Requests** error.
## IP address forwarding
By default, Supabase Auth uses the IP address of the client for rate limiting. With IP address forwarding, it uses the end-user IP address in the `Sb-Forwarded-For` header instead, such as when a server-side framework or proxy in front of your project calls Supabase Auth for your users.
The following conditions apply:
- Requests must use a [secret API key](/docs/guides/getting-started/api-keys). Publishable API keys and legacy `anon` and `service_role` API keys are not supported.
- IP address forwarding must be explicitly enabled for new projects.
To turn it on, see [Forward end-user IP addresses](/docs/guides/auth/rate-limits/ip-forwarding).
## Related resources
To change these limits or work within them, see these pages:
- [Change Auth rate limits](/docs/guides/auth/rate-limits/change): change a limit in the Dashboard or with the Management API.
- [Forward end-user IP addresses](/docs/guides/auth/rate-limits/ip-forwarding): rate limit by your end user's IP address when a server calls Supabase Auth for them.
- [Test auth flows](/docs/guides/auth/testing-auth-flows): test email and phone sign-in without hitting the email and SMS sending limits. The other limits on this page apply to tests too.
- [Auth error codes](/docs/guides/auth/debugging/error-codes): every error code Supabase Auth returns, including the rate limit ones.