Flutter Firebase Auth "[firebase_auth/too-many-requests]": Why Requests Are Blocked and a 4-Step Fix
What does "[firebase_auth/too-many-requests] We have blocked all requests from this device due to unusual activity" mean in Flutter?
It means Firebase Authentication refused the call because a rate limit or an abuse protection was triggered, not because your Flutter code or the firebase_auth plugin is broken. The message text comes from the Firebase Auth SDK, which maps the too-many-requests code to "We have blocked all requests from this device due to unusual activity. Try again later." FlutterFire's error-handling page says errors such as too-many-requests may be thrown "if you reach the Firebase Authentication quota." The usual causes are repeated sign-in, sign-up, verification-email or SMS requests from one device or IP in a short time. Firebase does not publish how long a block lasts. This guide was checked against the Firebase Authentication limits page, the Firebase JS SDK error map and the FlutterFire docs on 2026-12-03.
The Rate-Limit Check: 4 steps
Short answer: stop the repeated calls, find which limit you hit, use test numbers or emulators in development, and add cooldowns in the app.
- Stop sending. Do not keep tapping Sign in or Resend. Each extra attempt is another request from the same device and IP.
- Find the flow. Check which call threw: password sign-in, account creation,
sendEmailVerification, password reset, orverifyPhoneNumber. Each has its own limits. - Move testing off real traffic. Use fictional phone numbers from the Firebase console, or the Auth emulator, so tests stop counting against production limits.
- Add cooldowns and backoff. Disable resend buttons for a while after each send, and retry server jobs with growing delays.
Which Firebase Auth limits can cause too-many-requests?
Short answer: per-IP limits on sign-ups and phone verification, daily email-sending limits, project SMS limits, and unpublished abuse protections (figures from the limits page, checked 2026-12-03).
| Operation | Documented limit | Typical trigger in a Flutter app |
|---|---|---|
| New account creation | 100 accounts/hour for each IP address | Testing sign-up repeatedly from one office or home network |
| Phone verification requests | 150 requests/IP address/hour | Many verifyPhoneNumber calls from one network |
| Verification SMS per IP address | 50 sent/minute, 500 sent/hour | A resend button with no cooldown |
| Verification SMS per project | 900 sent/minute, 3,000 sent/day | Real numbers used in automated tests |
| Password reset emails | 150/day on Spark, 10,000/day on Blaze | A reset form without throttling |
| Address verification emails | 1,000/day on Spark, 100,000/day on Blaze | sendEmailVerification called on every app start |
| Email link sign-in emails | 5/day on Spark, 25,000/day on Blaze | Passwordless sign-in on a project with no billing instrument |
Last checked: 2026-12-03. The limits page also says verification-code SMS is a Blaze (pay as you go) feature, that there is a limit on SMS to a single phone number within a set time, and that "Abuse protections may be enabled without warning on accounts that demonstrate suspicious traffic patterns." Its note that limits "can change without notice" is the reason to re-check the page rather than hard-code these numbers.
Why does it happen even on the first sign-in?
Short answer: the block is tied to the device and network as well as the account, so a shared IP or a phone that already sent many requests can be blocked before a given user tries.
The per-IP limits in the table apply to every request from that address. A university network, an office NAT or a mobile carrier gateway can put many users behind one IP. During development the same thing happens on your own laptop: a test suite that creates accounts or sends codes on every run uses up the hourly per-IP allowance. The Admin SDK uses the same code with a plainer message, "The number of requests exceeds the maximum allowed," which is what server scripts see when they loop too fast.
How do you stop it in development?
Short answer: test phone flows with fictional numbers and test email flows against the Auth emulator, so nothing real is sent.
Firebase's Flutter phone-auth guide lets you add phone numbers for testing in the console (Authentication, Sign-in method, Phone, "Phone numbers for testing"). With a test number, "no SMS will actually be sent" and you enter the test code instead. For phone tests that should skip app verification, firebase_auth's setSettings has appVerificationDisabledForTesting; the API docs say it disables app verification "for the purpose of testing phone authentication," renders a mock reCAPTCHA, and requires the number to be whitelisted in the console. Keep it out of release builds:
import 'package:flutter/foundation.dart';
import 'package:firebase_auth/firebase_auth.dart';
Future<void> configureAuthForTests() async {
if (kDebugMode) {
// only with console test numbers; never in release builds
await FirebaseAuth.instance
.setSettings(appVerificationDisabledForTesting: true);
}
}
For email and password flows, point debug builds at the Auth emulator, which runs locally and has no production quota. If the emulator connection itself fails, our network-request-failed fix covers host and port setup.
How should the app handle the error in production?
Short answer: catch the code, show a clear "try again later" message, and stop the user from hammering the button.
try {
await FirebaseAuth.instance.signInWithEmailAndPassword(
email: email, password: password);
} on FirebaseAuthException catch (e) {
if (e.code == 'too-many-requests') {
showMessage('Too many attempts. Please wait a few minutes and try again.');
lockSignInButtonFor(const Duration(minutes: 5)); // your own cooldown
} else {
rethrow;
}
}
The five-minute cooldown is our app's choice, not a Firebase number; Firebase does not say when a block lifts. Also give resend buttons a visible countdown. Password errors are a different case: wrong credentials return invalid-credential, covered in our invalid-credential guide. If bots are hitting your sign-up endpoint with your public API key, see our Firebase Auth API key abuse hardening checklist.
When should you raise limits instead?
Short answer: only when real users, not tests or bots, are hitting a documented limit.
The limits page says you can schedule a temporary increase to the account-creation limit in the Firebase console, for example before a launch, and points to Google Cloud Identity Platform for higher SMS limits. Activity Logging lets you track verification codes sent per phone number. Before raising anything, check for loops, missing cooldowns and automated traffic. GSPTeck is giosaia's indie studio building mobile and web apps with Flutter and Firebase, and this is the order we check things in before touching any quota. For the wider release checklist, see the Flutter and Firebase release checklist for Google Play, and our other projects are on the GSPTeck homepage.
FAQ
How long does the too-many-requests block last?
Firebase does not publish a duration. The SDK message only says to try again later. Stop sending requests from that device and network, wait, and use test numbers or the emulator while you wait.
Can I turn off the "unusual activity" protection?
No. The limits page says abuse protections may be enabled without warning on suspicious traffic. You can avoid triggering it with cooldowns and test numbers, and some documented limits can be raised.
Why do I get it from sendEmailVerification?
Verification emails have daily limits (1,000 a day on Spark) and repeated sends from one device trigger the protection. Send once after sign-up and give the resend button a cooldown.
Is appVerificationDisabledForTesting safe in production?
No. The firebase_auth docs describe it as a testing setting that disables app verification and needs whitelisted numbers. Wrap it in a debug-only check.
Sources
- Firebase: Authentication limits (per-IP, SMS and email limits, abuse protections) (checked 2026-12-03)
- Firebase JS SDK: auth error map, too-many-requests message (checked 2026-12-03)
- FlutterFire: Error handling, too-many-requests and quota (checked 2026-12-03)
- FlutterFire: Phone authentication and phone numbers for testing (checked 2026-12-03)
- firebase_auth API: setSettings and appVerificationDisabledForTesting (checked 2026-12-03)
- Firebase Admin SDK: authentication error codes (checked 2026-12-03)