mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-23 23:49:53 +01:00
Route to error page on bad logout to prevent unrevoked token
This commit is contained in:
parent
35a6b0d87c
commit
84a9ba4297
@ -183,15 +183,13 @@
|
||||
axios.post('api/logout').then(response => {
|
||||
|
||||
localStorage.removeItem('jwt');
|
||||
localStorage.removeItem('user');
|
||||
delete axios.defaults.headers.common['Authorization'];
|
||||
|
||||
this.$router.go('/login');
|
||||
})
|
||||
.catch(error => {
|
||||
localStorage.removeItem('jwt');
|
||||
delete axios.defaults.headers.common['Authorization'];
|
||||
|
||||
this.$router.go('/login');
|
||||
this.$router.push({ name: 'error' });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user