2FAuth/resources/js/mixins.js

24 lines
410 B
JavaScript
Raw Normal View History

2020-10-08 14:48:18 +02:00
import Vue from 'vue'
Vue.mixin({
data: function () {
return {
appVersion: window.appVersion
}
},
methods: {
async appLogout(evt) {
await this.axios.get('/user/logout')
2020-10-08 14:48:18 +02:00
this.$storage.clear()
2020-10-08 14:48:18 +02:00
delete this.axios.defaults.headers.common['Authorization']
this.$router.push({ name: 'login' })
},
}
})