In my Flutter app I'm using the Firebase Auth package for user authentication. When I sign in everything seems to work for a while. But after a while (not sure if it's exactly 1 hour) I get the following messages in my debug console:
W/Firestore( 4587): (24.0.0) [FirestoreCallCredentials]: Failed to get auth token: com.google.firebase.FirebaseException: An internal error has occurred. [ INVALID_REFRESH_TOKEN ]. W/Firestore( 4587): (24.0.0) [WatchStream]: (3351d52) Stream closed with status: Status{code=UNAUTHENTICATED, description=null, cause=com.google.firebase.FirebaseException: An internal error has occurred. [ INVALID_REFRESH_TOKEN ]
From that moment on I can't access any Firebase Services. The way to fix this is to sign out and sign back in.
Not sure if this behaviour would occur in production as well as I'm using Firebase Emulators for Auth and Firestore in development.
