Skip to content

Updated

Auth rate limits

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.

Limits by endpoint

The following table lists each limit, what it's counted by, and whether you can change it.

OperationPathLimited ByCustomizableLimit
Emails sent by Supabase AuthAll email-sending Auth endpointsProjectCustom SMTP or Send Email hook2 emails per hour with the built-in email provider. You can configure this limit when you use custom SMTP or the Send Email hook.
SMS messages sent by Supabase AuthAll SMS-sending Auth endpointsProjectYesDefaults to 30 SMS messages per hour.
Sign-ups and sign-ins/auth/v1/signup /auth/v1/recover /auth/v1/resend /auth/v1/magiclink /auth/v1/otp /auth/v1/userIP AddressYesDefaults to 30 requests per 5 minutes, with bursts up to 30 requests. This limit excludes anonymous sign-ins.
Send OTPs or magic links/auth/v1/otpUserYesDefaults to a 60 seconds window before a new request is allowed for the same user.
Signup confirmation request/auth/v1/signupUserYesDefaults to a 60 seconds window before a new request is allowed for the same user.
Password reset request/auth/v1/recoverUserYesDefaults to a 60 seconds window before a new request is allowed for the same user.
Verification requests/auth/v1/verifyIP AddressYesDefaults to 30 requests per 5 minutes, with bursts up to 30 requests.
Token endpoint requests/auth/v1/tokenIP AddressYesDefaults to 150 requests per 5 minutes, with bursts up to 30 requests. This covers password, refresh token, ID token, and PKCE grants.
Create or verify an MFA challenge/auth/v1/factors/:id/challenge /auth/v1/factors/:id/verifyIP AddressNo15 requests per minute, with bursts up to 30 requests.
Anonymous sign-ins/auth/v1/signupIP AddressYesDefaults to 30 requests per hour, with a burst capacity equal to the configured limit. This limit only applies if the endpoint is called without an email or phone number in the request body.
Web3 sign-ups and sign-ins/auth/v1/tokenIP AddressYesDefaults to 30 requests per 5 minutes, with bursts up to 30 requests.

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

To change these limits or work within them, see these pages:

  • Change Auth rate limits: change a limit in the Dashboard or with the Management API.
  • Forward end-user IP addresses: rate limit by your end user's IP address when a server calls Supabase Auth for them.
  • Test 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: every error code Supabase Auth returns, including the rate limit ones.