mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-23 23:49:53 +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')
|
||||
|
||||
localStorage.removeItem('jwt');
|
||||
localStorage.removeItem('user');
|
||||
localStorage.removeItem('jwt')
|
||||
localStorage.removeItem('user')
|
||||
|
||||
delete this.axios.defaults.headers.common['Authorization'];
|
||||
|
||||
this.$router.go('/login');
|
||||
delete this.axios.defaults.headers.common['Authorization']
|
||||
|
||||
this.$router.push({ name: 'login' })
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user