If Firebase Auth works in a React Native app, it is very tempting to assume the rest of Firebase is configured correctly too.
But that is not always true.
One of the more frustrating debugging patterns is this:
- sign-in works
- the user exists
- auth state looks valid
- but Firestore requests still fail
Sometimes the error is permission-denied. Sometimes it looks like missing data. Sometimes it only fails in release. And sometimes the real problem has very little to do with Auth itself.
I ran into this kind of issue while debugging React Native Android + Firebase setups, and one of the most useful mindset shifts was this:
If Auth works but Firestore fails, stop thinking in terms of “Firebase works” vs “Firebase does not work.”
Start separating the layers.
Auth working does not prove Firestore is fine
Firebase Auth and Firestore are related, but they do not prove each other.
Auth working only proves certain things, such as:
- the app can talk to Firebase Auth
- sign-in flow is functioning
- the current user may exist
- some Firebase configuration is at least partially correct
It does not guarantee that:
- Firestore security rules allow access
- the Firestore request is happening at the right time
- App Check is configured correctly
- the correct Firebase project is being used
- release-specific Android setup is correct
That is why this pattern is so misleading.
What I would check first
1. Confirm the user is actually available at the moment of the Firestore call
A common mistake is assuming:
- “the user signed in successfully”
- therefore “the Firestore request is authenticated”
But depending on timing, the Firestore call may happen before auth state is fully ready in the part of the app making the request.
So I would verify:
-
auth().currentUseris not null at the time of the call - the request runs only after auth initialization completes
- no screen or hook is firing too early
This is especially important if the app structure triggers Firestore reads immediately on load.
2. Check Firestore rules separately from Auth
Even if the user is signed in, Firestore rules may still reject the request.
For example:
- the rule expects a specific UID match
- the request path is different than expected
- the collection/document is more restricted than assumed
- the rule logic depends on fields or conditions you forgot about
This is why “user is logged in” is not enough by itself.
If I suspect rules, I would test them directly in a safe environment and confirm whether the specific request path is actually allowed.
3. Check whether App Check is blocking Firestore
This is one of the easiest things to miss.
You can have:
- working Firebase Auth
- valid user session
- normal-looking Firestore code
...and still get Firestore failures because App Check is enabled and not configured correctly.
That is especially relevant on Android if:
- App Check enforcement is ON
- Play Integrity is involved
- native App Check setup is incomplete
- the wrong SHA-256 fingerprint is registered
In that situation, the app can look partially healthy while Firestore keeps failing.
4. Verify you are using the correct Firebase project/config
Another sneaky issue is partial configuration correctness.
Auth may appear to work, but Firestore may be pointing to a different environment or using project settings that do not match what you expect.
I would check:
google-services.json- Android package/project alignment
- whether debug/release are using the same intended Firebase project
- whether the Firestore data/rules you are checking belong to the same project the app is using
This kind of mismatch wastes a lot of time because the app feels “mostly connected.”
5. Watch for debug vs release differences
Sometimes Auth works in both builds, but Firestore fails only in release.
When that happens, I would immediately suspect:
- App Check / Play Integrity
- signing / SHA-256 setup
- release-only Android differences
- native initialization issues
If debug works and release fails, I would stop treating it like a generic Firebase problem and start treating it like a release-environment problem.
6. Check request timing and app flow, not just configuration
Not every failure is about console setup.
Sometimes the app flow is the real issue.
Examples:
- Firestore call runs before auth state is ready
- request depends on user data that has not loaded yet
- listener starts too early
- logic assumes signed-in state before it is actually stable
That is why logging the exact order of events can help more than staring at config files.
A practical mental model
When Firebase Auth works but Firestore fails, I usually split the possibilities into these buckets:
Bucket 1: Access control
- Firestore rules
- wrong path
- wrong UID/condition assumptions
Bucket 2: Runtime state
- auth not ready at request time
- app flow timing
- screen/hook lifecycle issues
Bucket 3: Project/setup
- wrong Firebase project
- wrong config file
- release/debug mismatch
Bucket 4: Trust/enforcement
- App Check
- Play Integrity
- SHA-256
- native Android setup
That mental model makes the problem much easier to narrow down.
What I would not assume
If Auth works, I would not immediately assume:
- Firestore rules must be fine
- Firebase project setup is fully correct
- App Check cannot be the problem
- the issue is definitely in the query code
- the app is fully authenticated at the exact moment of the request
Those assumptions are what usually slow the debugging down.
My practical order of checks
If Firebase Auth works but Firestore fails in a React Native app, this is the order I would usually follow:
- verify auth state at the exact request moment
- inspect Firestore rules and path assumptions
- check whether App Check enforcement is involved
- verify project/config alignment
- compare debug vs release behavior
- inspect initialization timing and app flow
That order tends to reduce guesswork.
I built a small helper for this kind of issue
While working through React Native / Firebase / Android debugging problems, I built a small free error helper here:
It is meant to help narrow down likely causes faster.
Final takeaway
If Firebase Auth works but Firestore fails, do not think of it as a contradiction.
Think of it as a clue.
It usually means one layer is working, while another layer is rejecting or breaking the request:
- rules
- timing
- project config
- App Check
- release-only setup
That is where I would start every time.
Top comments (0)