I tried to copy this article, but the store was not persistent
Specifically, the middleware authenticates FirebaseAuth before page loading.
During authentication, the onAuthStateChanged function retrieves user information and stores it in the store.
However, when reloading, user information can be obtained only null, and even if it has been authenticated, it is not authenticated, so when reloading, it is authenticated with the contents of the store.
Please teach me the solution.
See the formula for easy implementation.
Below is a sample authentication screen for FirebaseAuth based on the formula, so
Please refer to it
https://github.com/Ittan888/nuxt-firebase-auth-sample
© 2024 OneMinuteCode. All rights reserved.