Losing Session on F5 (Reload) with Middleware and Pinia in a Nuxt.js Application
Hello, community!
I'm experiencing an issue with session management in a Nuxt.js application that uses Pinia for state management and a custom middleware for access control. Navigation between pages and actions within the app works perfectly, keeping the user's session active without any issues. However, whenever F5 is pressed to reload the page, the session is lost, and the user is redirected to the login page.
I've attached screenshots of my setup overview.
I noticed the problem occurs when refreshing the page with F5, which leads me to believe there might be something related to session persistence or route handling that I'm missing.
Questions:
Is there anything specific about Nuxt.js or Pinia that I should be aware of when dealing with page reloads and session persistence?
Could it be an issue with how I'm defining or using the middleware or the configuration of Pinia for persistence?
Has anyone faced a similar issue and could share insights or solutions?
Any help or guidance would be greatly appreciated. Thank you!
0 Replies