Does FirebaseAuth re-authentication invalidate Firestore subscriptions in Flutter apps

Viewed 9

This is happening in a Flutter/Firebase app on iOS and Android.

I am seeing problems where my Firestore subscriptions become unresponsive to database changes. It's not clear to me why they work beautifully most of the time and then become stubbornly silent.

I also notice that authentication seems to happen from time to time, as I am listening on the FirebaseAuth.instance.userChanges() stream. I vaguely recall something about tokens needing to be refreshed which might explain that behavior.

I was wondering if the two things are correlated? Does a re-authentication invalidate Firestore subscriptions?

The subscriptions don't seem to throw an error

    foo.snapshots().listen(
      () => notAlwaysCalled(), 
      onError: (e) => neverCalled(),
    );
0 Answers
Related