Short answer
Firebase couldn’t verify that the request came from your app. On the web, add your live domain to Authorized domains and render the reCAPTCHA verifier before calling signInWithPhoneNumber. On Android, add the app’s SHA-256 fingerprints, including the Play App Signing one, in the Firebase console. On iOS, upload an APNs key and add the URL scheme so the reCAPTCHA fallback works.
What failed, by platform
01
Web: the domain isn’t authorized
“Note that localhost is not allowed as a hosted domain for the purposes of phone auth.” Firebase, Authenticate with Firebase with a phone number (web)
Phone sign-in only runs on domains listed in Firebase Authentication’s settings. Add the production domain and any custom domain the app is served from. Firebase’s docs say localhost isn’t allowed as a hosted domain for phone auth, so test on a deployed domain.
02
Web: the reCAPTCHA token is missing or stale
“Thrown if the reCAPTCHA response token was invalid, expired, or if this method was called from a non-whitelisted domain.” Firebase, firebase.auth.Auth
Create the RecaptchaVerifier once, after the button or container exists, and reuse it. A verifier created twice, or a token reused after a failed attempt, fails the check. Reset it before retrying. Firebase documents the related captcha-check-failed code like this:
03
Android: the SHA-256 fingerprint is missing
“To use Play Integrity, specify your app's SHA-256 fingerprint if you haven't already.” Firebase, Authenticate with Firebase on Android using a phone number
Play Integrity needs the app’s SHA-256 fingerprints registered. Add the SHA-256 from your debug key, your upload key and the Play App Signing key (Play Console, App integrity), since store builds are signed with Google’s key, then download a fresh google-services.json.
04
iOS: no APNs key, or the reCAPTCHA fallback is blocked
“This reCAPTCHA flow requires your API Key to be unrestricted or allowlisted for "${PROJECT_NAME}.firebaseapp.com".” Firebase, Authenticate with Firebase on Apple platforms using a phone number
Upload an APNs authentication key to Firebase and add the Encoded App ID as a URL scheme in Xcode. When the silent push can’t arrive, as on the simulator, Firebase falls back to reCAPTCHA, which also fails if the API key’s restrictions don’t allow it.
Checked against the vendor’s docs on : Firebase docs: Phone authentication (web); Firebase docs: Phone authentication (Android); Firebase docs: Phone authentication (Apple platforms); Firebase reference: firebase.auth.Auth.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.See scope and start
Related: Firebase App Check blocking requests · Firebase auth/too-many-requests · Firebase Google sign-in DEVELOPER_ERROR on Android · Firebase auth/invalid-credential