Currently, I am in the process of developing a spa using Vue.js as the front end framework. It interacts with a back-end system that utilizes pure JSON and jsonwebtokens for security. While I am more experienced with the React ecosystem, my new role requires me to work with Vue.js.
In React, protecting client-side routes involves checking for a jsonwebtoken in localstorage before mounting the app, and setting the redux state accordingly. Route protection is typically implemented using higher order components by checking the logged in state in the componentWillMount lifecycle method.
Unfortunately, it seems that achieving similar behavior with higher order components in Vue is not as straightforward or well-documented. As I navigate this challenge, I would appreciate insights from others on how they would approach this issue.