1// call
2store.commit('authenticate', {
3 token,
4 expiration,
5});
6
7// mutation
8mutations: {
9 authenticate(state, { token, expiration }) {
10 localStorage.setItem('token', token);
11 localStorage.setItem('expiration', expiration);
12 }
13}