[Vuejs]-Restoring Vue state (vuex) when reopening app

0👍

There should be two ways to solve your problem:

  • You can use a plugin (for example @capacitor-firebase/authentication). This persists the state for you and fires onAuthStateChanged on startup.
  • You can try to set persistence to indexedDBLocalPersistence when initializing Firebase Authentication:
initializeAuth(firebaseApp, {
  persistence: indexedDBLocalPersistence
});

Leave a comment