If your iOS app signs people out unexpectedly, you lose them at the worst moment: mid-session, mid-purchase, mid-task. Firebase Apple SDK 13.1.0 (21 October 2026) changes how Firebase Auth handles INVALID_ID_TOKEN and TOKEN_EXPIRED errors. Previously these could sign the user out. Now the SDK refreshes the token first. It also fixes a crash loop caused by very large token lifetimes and a first-listener call that could report “no user” while the stored user was still loading.
These are good fixes, but without tracking you cannot tell whether they helped your app. Unexpected sign-outs rarely show up as crashes. They show up as vague drops in retention, support tickets saying “it logged me out again”, and funnels that quietly leak at the login step.
Data Points to Track
Log these as events or properties so you can compare before and after the upgrade:
auth_state_changewithfrom_state,to_stateandreason(user_initiated,token_expired,token_invalid,unknown)auth_token_refreshwithresult(success,failed),latency_msandtrigger(foreground,api_call,listener)auth_listener_first_callbackwithuser_present(boolean) andms_since_launchsession_interrupted_by_signoutwithscreen_nameandseconds_into_sessionreauth_prompt_shownandreauth_prompt_completedfirebase_apple_sdk_versionas a user or event propertytoken_lifetime_bucketif you use custom tokens (under 1 hour, 1-24 hours, over 24 hours)
Setup Steps
- Add
firebase_apple_sdk_versionas a user property before you upgrade, so you have a clean baseline. - Register an auth state listener and send
auth_state_changewhenever the user goes from signed in to signed out without a tap on your sign-out button. Mark those with a non-user-initiatedreason. - Wrap your token fetch (
getIDTokenForcingRefresh) with timing code and sendauth_token_refreshwith the result and latency. - Record the first listener callback after launch. If
user_presentis false but the person is later signed in, you have found the loading race the release notes describe. - Ship the upgrade to a staged rollout (for example 10 per cent) and keep the old version on the rest.
- Build a dashboard comparing involuntary sign-out rate per 1,000 sessions by SDK version.
- If you issue custom tokens, check the lifetime you set. Values outside a 24-hour window now fall back to one hour, which may shorten sessions you expected to be longer.
Actionable Insights
Involuntary sign-out rate is your headline number. If it drops after the upgrade, the fix is working. If it stays flat, your sign-outs have another cause, such as revoked sessions or password changes on the server.
Refresh failure rate tells you whether the new behaviour is silently failing. A high failed share means users will still hit a login screen, just later.
Launch-time user_present false values point to UI flashes of the logged-out state. Delay your first screen decision until the listener has fired, then watch bounce at launch.
Token lifetime shifts matter if you use custom tokens. A sudden shortening of average session length for those users after the upgrade is the signal to review your configured lifetime.
Pair the data with support volume. A fall in “logged out” complaints alongside the metrics above is the strongest proof the upgrade paid off.