Dev.to WebDev 🛠 Dev 👁 2 📖 4 min read

Supabase "email rate limit exceeded" on signup

You build a signup form with Lovable, Bolt, or Cursor. It works for the first test. After a few more tests, or the first small burst of real users, signup stops and the response looks like this: HTTP/1.1 429 Too Many

You build a signup form with Lovable, Bolt, or Cursor. It works for the first test. After a few more tests, or the first small burst of real users, signup stops and the response looks like this:

HTTP/1.1 429 Too Many Requests

{"code":429,"error_code":"over_email_send_rate_limit","msg":"email rate limit exceeded"}

In supabase-js this arrives as an AuthApiError with status 429 and code set to over_email_send_rate_limit. The UI often shows only "Something went wrong". This is a send limit, not a bug in your form, and the default quota is very low.

Three limits that look the same

The message and code tell you which limit you hit.

  • Project hourly quota. Message email rate limit exceeded, code over_email_send_rate_limit. With the built-in provider, Supabase lists 2 emails per hour for the whole project (the docs say this can change without notice). Confirmation, magic link, password reset, invite, and email change each use one.
  • Per address cooldown. Message For security purposes, you can only request this after N seconds. and the same code. By default the same address can get the same kind of email only once every 60 seconds. The number is the time left. If it says "you can only request this after 0 seconds", wait a moment and retry.
  • Per IP request limit. Code over_request_rate_limit. Too many requests from one IP to signup, login, magic link, recovery, or resend, often from a useEffect that fires in a loop.

Two emails an hour means one signup and one password reset use up the hour for everyone.

Confirm which limit it is

In DevTools, open the failed request to /auth/v1/signup, /auth/v1/recover, or /auth/v1/otp and read the body. Auth logs in the dashboard show the same. Hourly message: custom SMTP. 60 second message: fix the form. over_request_rate_limit: look for a loop.

Stop burning the quota while you test

On the built-in sender, every test signup costs an email. Reuse a few addresses: delete test users from Authentication, Users instead of creating new ones. In a development project only, you can turn off email confirmation under Authentication, Sign In / Providers, Email. Never leave that off in production. The built-in sender also only delivers to your project's team; everyone else fails with Email address not authorized.

Set up custom SMTP

A transactional provider sends the mail, and Supabase then lets you raise the limit.

  1. Pick a provider. Resend, Postmark, Brevo, and Amazon SES all work, and most have a free tier.
  2. Verify your sending domain (SPF and DKIM). Without those records, mail lands in spam even when Supabase reports success.
  3. In Authentication, Emails, SMTP Settings, turn on custom SMTP and enter the host, port, username, password, and sender address.
  4. Save, then sign up with an address that is not on your team and check that the mail arrives.

Keep the sender on the verified domain, for example [email protected]. Turn off link tracking for these mails; Supabase warns that tracking can rewrite the confirmation link and break it.

Raise the hourly limit

After you save custom SMTP, the starting limit is 30 emails per hour. In Authentication, Rate Limits, set a number that covers signups and password resets in your busiest hour. You can also set rate_limit_email_sent through the Management API:

curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \
  -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "rate_limit_email_sent": 100 }'

The access token is a personal token from account settings. Treat it like a password and keep it out of the repository.

Make the form handle it

Branch on the error code, not the text, and put a cooldown on the resend button:

const [cooldown, setCooldown] = useState(0);

async function handleSignUp(email: string, password: string) {
  const { error } = await supabase.auth.signUp({ email, password });
  if (error?.code === "over_email_send_rate_limit") {
    setMessage("We have sent a lot of emails just now. Wait a minute and try again.");
    setCooldown(60);
    return;
  }
  if (error) { setMessage(error.message); return; }
  setMessage("Check your inbox for the confirmation email.");
  setCooldown(60);
}

useEffect(() => {
  if (cooldown === 0) return;
  const id = setTimeout(() => setCooldown(cooldown - 1), 1000);
  return () => clearTimeout(id);
}, [cooldown]);

Set disabled={cooldown > 0} on the button and show the seconds left. To resend, call supabase.auth.resend({ type: "signup", email }) rather than signing up again.

If it is over_request_rate_limit

This one is about requests per IP, not emails. Look for signUp, signInWithOtp, resetPasswordForEmail, or resend inside a useEffect with a bad dependency list, and move the call into a click handler. If a server calls Auth for many users, they share the server IP, so forward each user's real IP with the Sb-Forwarded-For header and a secret key, as Supabase documents, and enable IP forwarding in the rate limit settings.

Set up custom SMTP before launch, send a test from a non-team address on a phone, and add a CAPTCHA if bots start emptying the quota.

The full guide is at https://aiappmedic.com/guides/supabase-email-rate-limit-exceeded . You can also run a free scan of your app at https://aiappmedic.com/scan .

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.