This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/plugins/auth.js

10 lines
228 B
JavaScript
Raw Normal View History

export default ({app, store}) => {
const token = app.$cookies.get('token');
if (token) {
store.commit('setToken', token);
if (!store.state.token) {
app.$cookies.removeAll();
}
}
}