[Vuejs]-Vuex : token doesn't stored in local storage

0👍

First of all, you need to set the axios headers authorization

  axios.defaults.headers.common['Authorization'] = 'Bearer ' + token;

The above is if you are using Bearer auth.

Secondly, make sure if backend sends in login a refresh token because you need also that to save in local storage.

0👍

you can use npm install --save vuex-persistedstate@3.2.1

Leave a comment