6
votes

Does firebase auth still keep the user in offline mode of a progressive web app ?

How does firebase auth works if the app is in offline ? Would like to know the two scenario.

  1. User want to login for the first time during the app is in offline (app is using pouchDB & CouchDB for sync)
  2. User already signed in, but app became offline. Does this mode even still work with firebase auth ?

Regards, Sowmyan

1

1 Answers

6
votes

Authenticating the user requires an active connection. There is no way for Firebase to authenticate your users without connecting to its servers.

Once the user is authenticated, the app will continue working when the user goes offline. Firebase Database operations will be reading from the local cache and writing to a queue. Once the connection is restored, the user's authentication token is (if needed) refreshed and the writes are sent to the server.