diff --git a/src/site/plugins/axios.js b/src/site/plugins/axios.js index cc6d98e..843a258 100644 --- a/src/site/plugins/axios.js +++ b/src/site/plugins/axios.js @@ -13,6 +13,10 @@ export default function({ $axios, store }) { text: error.response.data.message, error: true }); + + if (error.response.data.message.indexOf('Token expired') !== -1) { + store.dispatch('logout'); + } } }); }