Sowmyan Soman
Sowmyan Soman

Reputation: 923

Firebase Auth - progressive web app (polymer) offline mode

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

Upvotes: 9

Views: 3961

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599131

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.

Upvotes: 12

Related Questions