Environment
|
Version |
@react-native-firebase/app |
24.1.1 (latest on npm) |
@react-native-firebase/auth |
24.1.1 |
| Firebase iOS SDK (bundled) |
12.10.0 (from package.json sdkVersions.ios.firebase) |
| Expo SDK |
56.0.0 |
| React Native |
0.85.3 |
| Platform |
iOS only (Android phone auth works) |
| Distribution |
TestFlight / production APNs |
| iOS version tested |
iOS 26.5 (iPhone 17,3) |
| Firebase project |
tabiby-rn, project number 58556901822 |
| App bundle ID |
com.khazer.tabiby |
What is happening
Phone auth (signInWithPhoneNumber) fails on real iOS devices (TestFlight). Firebase test numbers pass fine. The SDK surfaces [auth/internal-error] An internal error has occurred which is an empty-body 400/503 — the real server error is hidden.
Android phone auth works correctly — SMS delivers, OTP flow completes.
Root cause — confirmed from Sentry network breadcrumbs (production build)
The SDK calls the legacy googleapis.com/identitytoolkit/v3/relyingparty endpoint rather than the modern identitytoolkit.googleapis.com/v1/accounts endpoint. reCAPTCHA Enterprise tokens are generated successfully (all api3 calls return 200) but are then sent to the v3 endpoint which rejects them.
Full network trace from Sentry breadcrumbs on build com.khazer.tabiby@1.0.1+20:
POST [Filtered] 403 ← APNs verifyClient rejected
POST [Filtered] 400 ← sendVerificationCode first attempt rejected
GET https://identitytoolkit.googleapis.com/v2/recaptchaConfig 200 ← SDK fetches reCAPTCHA config
GET https://www.gstatic.com/recaptcha/verify_key/orcas/prod/ios/verify_key.txt 200
POST https://www.recaptcha.net/recaptcha/api3/mri 200 ─┐
POST https://www.recaptcha.net/recaptcha/api3/moa 200 ├─ reCAPTCHA Enterprise token generated OK
POST https://www.recaptcha.net/recaptcha/api3/mrr 200 ─┘
POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode 503 ← FAILS
The reCAPTCHA Enterprise token is generated (Firebase Console confirms healthy scores), but is sent to https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode which returns 503 Service Unavailable.
The v3 endpoint predates reCAPTCHA Enterprise. The modern endpoint that accepts these tokens is https://identitytoolkit.googleapis.com/v1/accounts:sendVerificationCode.
Additional context
- Both credential paths fail: APNs
verifyClient returns 403. reCAPTCHA Enterprise token sent to v3 returns 503. This is not a configuration issue — every configurable surface has been verified correct over 19+ TestFlight builds.
- Firebase iOS SDK 12.10.0 is what
@react-native-firebase v24.1.1 bundles (from package.json sdkVersions.ios.firebase). Firebase iOS SDK 12.15.0 is the latest available; its changelog (12.11–12.15) shows no phone auth endpoint changes.
@react-native-firebase v24.1.1 is already the latest on npm — there is no v25 to upgrade to.
- Android works — presumably because the Android Firebase SDK already uses the modern endpoint (or Play Integrity tokens are accepted by v3).
- Probing
v3/relyingparty/sendVerificationCode directly with the iOS API key returns INVALID_APP_CREDENTIAL without a reCAPTCHA token, and 503 with a reCAPTCHA Enterprise token.
- The 503 may indicate Google is actively deprecating the v3 endpoint, which would mean every iOS app on
@react-native-firebase v24 is affected or about to be affected.
What we need
- Confirmation of which Identity Toolkit endpoint Firebase iOS SDK 12.10.0 calls for phone auth.
- Confirmation of which Firebase iOS SDK version switches to
v1/accounts:sendVerificationCode.
- A patch release of
@react-native-firebase that bundles a Firebase iOS SDK version where the correct endpoint is used.
The workaround in place is Google Sign-In + Apple Sign-In (both work fine via OAuth/OIDC, bypassing phone auth entirely). But phone OTP is the primary sign-in method for this healthcare app's user base.
Steps to reproduce
- Install
@react-native-firebase/auth v24.1.1 in an Expo SDK 56 app.
- Configure Firebase phone auth with reCAPTCHA Enterprise (
PHONE_PROVIDER: ENFORCE).
- Distribute via TestFlight (production APNs environment).
- Call
signInWithPhoneNumber(auth, phoneNumber) on a real iOS device.
- Observe: no SMS received.
auth/internal-error thrown.
- Inspect Sentry/network logs:
v3/relyingparty/sendVerificationCode called, returns 503.
Environment
@react-native-firebase/app@react-native-firebase/authpackage.json sdkVersions.ios.firebase)tabiby-rn, project number58556901822com.khazer.tabibyWhat is happening
Phone auth (
signInWithPhoneNumber) fails on real iOS devices (TestFlight). Firebase test numbers pass fine. The SDK surfaces[auth/internal-error] An internal error has occurredwhich is an empty-body 400/503 — the real server error is hidden.Android phone auth works correctly — SMS delivers, OTP flow completes.
Root cause — confirmed from Sentry network breadcrumbs (production build)
The SDK calls the legacy
googleapis.com/identitytoolkit/v3/relyingpartyendpoint rather than the modernidentitytoolkit.googleapis.com/v1/accountsendpoint. reCAPTCHA Enterprise tokens are generated successfully (allapi3calls return 200) but are then sent to the v3 endpoint which rejects them.Full network trace from Sentry breadcrumbs on build
com.khazer.tabiby@1.0.1+20:The reCAPTCHA Enterprise token is generated (Firebase Console confirms healthy scores), but is sent to
https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCodewhich returns 503 Service Unavailable.The v3 endpoint predates reCAPTCHA Enterprise. The modern endpoint that accepts these tokens is
https://identitytoolkit.googleapis.com/v1/accounts:sendVerificationCode.Additional context
verifyClientreturns 403. reCAPTCHA Enterprise token sent to v3 returns 503. This is not a configuration issue — every configurable surface has been verified correct over 19+ TestFlight builds.@react-native-firebasev24.1.1 bundles (frompackage.jsonsdkVersions.ios.firebase). Firebase iOS SDK 12.15.0 is the latest available; its changelog (12.11–12.15) shows no phone auth endpoint changes.@react-native-firebasev24.1.1 is already the latest on npm — there is no v25 to upgrade to.v3/relyingparty/sendVerificationCodedirectly with the iOS API key returnsINVALID_APP_CREDENTIALwithout a reCAPTCHA token, and 503 with a reCAPTCHA Enterprise token.@react-native-firebasev24 is affected or about to be affected.What we need
v1/accounts:sendVerificationCode.@react-native-firebasethat bundles a Firebase iOS SDK version where the correct endpoint is used.The workaround in place is Google Sign-In + Apple Sign-In (both work fine via OAuth/OIDC, bypassing phone auth entirely). But phone OTP is the primary sign-in method for this healthcare app's user base.
Steps to reproduce
@react-native-firebase/authv24.1.1 in an Expo SDK 56 app.PHONE_PROVIDER: ENFORCE).signInWithPhoneNumber(auth, phoneNumber)on a real iOS device.auth/internal-errorthrown.v3/relyingparty/sendVerificationCodecalled, returns 503.