0👍
Something as simple as this should get you going in the right direction:
axios.interceptors.response.use(response => {
if (response.data.token) {
window.localStorage.setItem('token', response.data.token)
}
});
- [Vuejs]-Implementing prerender SPA plugin to vue2js application
- [Vuejs]-Keeping a user logged in from a Vue.js SPA outside the SPA (websanova)
Source:stackexchange.com