My app uses the Firebase API for User Authentication, saving the Login status as a boolean value in a Vuex State.
When the user logs in I set the login status and conditionally display the Login/Logout button accordingly.
But when the page is refreshed, the state of the vue app is lost and reset to default
This causes a problem as even when the user is logged in and the page is refreshed the login status is set back to false and the login button is displayed instead of logout button even though the user stays logged in....
What shall I do to prevent this behavior
Shall I use cookies Or any other better solution is available...
-
-