pwa-module icon indicating copy to clipboard operation
pwa-module copied to clipboard

Question - Auth strategy for when in offline mode

Open AdamBD opened this issue 4 years ago • 1 comments

Hello,

This is a question for advice on best practices with auth covered routes in PWA. I am using the nuxt/firebase module for handling user auth.

When a user is in offline mode and loads a protected route, the firebase module gets stuck in that it cannot authenticate because it is offline.

What is the proper way to handle this in PWA offline mode?

AdamBD avatar Nov 08 '20 13:11 AdamBD

I would refer to browser storage with some credentials that are not sensitive e.g store a uid in cookies with some other metadata and set some kind of expiry while using that as a source of truth till you get back online. I haven't really thought it out properly though.

vinosamari avatar Jan 01 '24 10:01 vinosamari