SMS Delay Investigation โ Phone Verification During Admin Migration โ
Date: 2026-03-22
Summary โ
Investigated a noticeably slow SMS verification delivery during admin account creation via the phone migration flow. The SMS eventually arrived and everything worked, but the delay was suspicious.
Investigation โ
What Was Checked โ
Cloud Run logs for
auth-apiโ All API responses were fast:/auth/phone/check-adminโ 0.22s/auth/phone/lookupโ 0.05s/auth/phone/tokenโ 0.17s
Cold start analysis โ No cold start during this session. Instance was already warm from a deployment rollout. Historical data shows cold starts on
/phone/lookupcan add 2-3s (observed on 03/19), but this was not a factor today.Flow path โ No
/auth/admin/provider-link/startrequests were logged, confirming thePhonePinSignupflow was used (not the invite-basedAdminSignupflow).
Conclusion โ
The delay occurred in Firebase's SMS delivery layer, after the client calls signInWithPhoneNumber. Our backend had no role in the delay. Possible causes:
- Carrier-side SMS queuing โ varies by carrier and time of day
- Invisible reCAPTCHA risk scoring โ Google's risk engine can silently add time before approving the SMS send
- Firebase project-level SMS throttling โ dev project may have lower quotas
Action Items โ
- If it recurs: Check Firebase Console โ Authentication โ Usage for SMS delivery metrics
- If cold starts become an issue separately: Consider setting a minimum instance count on
auth-apiin Cloud Run - No code changes needed โ the issue is external to our stack