I am facing an issue with my react single page application and so far I did not find any solution.
Every time I refresh a page within my application, it logs out and then logs in again. This takes a few seconds every time and the application stops during that time. Unfortunately this is completely ruining the user experience.
1 solution could be using the localstroage to store the token and avoid this refresh problem but from a security point of vue it is not recommended.
This is likely from a silent authentication, which makes a call to validate the session and issues a new token. You should not persist tokens in the browser, this includes local storage.
How often is your SPA refreshing? Just on the initial load?