From c248fc6c0633b0b34e748dd9ed33a785995ae108 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 17 Aug 2020 23:07:23 -0600 Subject: [PATCH] Add a function to expire the authentication token --- src/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.js b/src/main.js index e22b4c9..576d6f5 100644 --- a/src/main.js +++ b/src/main.js @@ -28,6 +28,11 @@ Vue.mixin({ css_var(var_name) { return getComputedStyle(document.documentElement).getPropertyValue(var_name); }, + auth_expired() { + sessionStorage.removeItem(this.storage_key.token); + window.location.hash = ``; + window.location.href = this.auth_redirect; + }, }, });