When hitting /start-dojo, it gets redirected to /dashboard/start-dojo. When the user is un-authenticated, the /dashboard will redirect to /login with the proper referer.
However, /login is on a different stack, namely VueJs. A reload is necessary in order to load the proper front-end files.
To do so, we call window.location.reload(). The issue lies in the redirection happening in parallel to the /dashboard/start-dojo redirection. The redirection seems to be non-deterministic, hence the definition of race condition between each redirection, from /dashboard to /login.
When hitting /start-dojo, it gets redirected to /dashboard/start-dojo. When the user is un-authenticated, the /dashboard will redirect to /login with the proper referer. However, /login is on a different stack, namely VueJs. A reload is necessary in order to load the proper front-end files. To do so, we call window.location.reload(). The issue lies in the redirection happening in parallel to the /dashboard/start-dojo redirection. The redirection seems to be non-deterministic, hence the definition of race condition between each redirection, from /dashboard to /login.