Checking auth token valid before route enter in Vue router : <p>I have a simple use case, where my application is using <code>vue-router</code> and <code>vuex</code>. Then <code>store</code> contains a <code>user</code> object which is <code>null</code> in the beginning. After the user is validated from the server it sends back an <code>user</code> object which contains a <code>JWT</code> auth token which is assigned to the <code>user</code> object in the store. Now lets assume that the user came back after 3 hours and tried to visit a route or perform any other action, considering that the auth token has expired by then, what would be the best way to check that(need to call <code>axios post</code> to check it) and redirect user to the <code>login</code> page. My app will have loads of components so I know I can write logic to check the token valid in the <code>mounted</code> hook of each component but that would mean repeating it all of the components. Also I don't want to use the <code>beforeEach</code> navigation guard because I cannot show any visual feedback to the user like <code>checking...</code> or <code>loading...</code>.</p>
