0
0
Fork 0

Accept the error object in the auth expiration function

This commit is contained in:
Oliver-Akins 2020-08-17 23:43:51 -06:00
parent 5ad272eccb
commit 319370a3ff
5 changed files with 16 additions and 12 deletions

View file

@ -35,10 +35,14 @@ Vue.mixin({
css_var(var_name) {
return getComputedStyle(document.documentElement).getPropertyValue(var_name);
},
auth_expired() {
auth_expired(error = null) {
sessionStorage.removeItem(this.storage_key.token);
window.location.hash = ``;
window.location.href = this.auth_redirect;
if (error) {
window.location.href = `${this.home_page}?error=${error}`;
} else {
window.location.href = this.home_page;
};
},
},
});