mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-24 16:09:14 +01:00
Fix logout function not redirecting to login form
This commit is contained in:
parent
b40fc65120
commit
9dcb8e0da9
@ -33,13 +33,12 @@
|
|||||||
|
|
||||||
await this.axios.get('api/logout')
|
await this.axios.get('api/logout')
|
||||||
|
|
||||||
localStorage.removeItem('jwt');
|
localStorage.removeItem('jwt')
|
||||||
localStorage.removeItem('user');
|
localStorage.removeItem('user')
|
||||||
|
|
||||||
delete this.axios.defaults.headers.common['Authorization'];
|
delete this.axios.defaults.headers.common['Authorization']
|
||||||
|
|
||||||
this.$router.go('/login');
|
|
||||||
|
|
||||||
|
this.$router.push({ name: 'login' })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user