2FAuth/resources/js/mixins.js
2020-10-08 15:33:20 +02:00

26 lines
462 B
JavaScript
Vendored

import Vue from 'vue'
Vue.mixin({
data: function () {
return {
appVersion: window.appVersion
}
},
methods: {
async appLogout(evt) {
await this.axios.get('api/logout')
localStorage.removeItem('jwt')
localStorage.removeItem('user')
delete this.axios.defaults.headers.common['Authorization']
this.$router.push({ name: 'login' })
},
}
})