diff --git a/resources/js/views/Login.vue b/resources/js/views/Login.vue index 1f469f9..4977ccd 100644 --- a/resources/js/views/Login.vue +++ b/resources/js/views/Login.vue @@ -3,9 +3,12 @@

- Authenticated with token ID {{ tokenId }}
+ Authenticated with token ID {{ tokenId }} +
Authentication status: {{ status ? 'Valid' : 'Invalid' }} +
+

@@ -57,7 +60,17 @@ export default { return tokenData.token; } } - } + }, + logout() { + axios.defaults.headers.common.Authorization = null; + + if (!!window.localStorage.getItem('authentication-token')) { + window.localStorage.removeItem('authentication-token'); + } + + this.status = false; + this.tokenId = null; + }, } }