From bb8fd5500dc2ef90096ff37aea8710588fa46fff Mon Sep 17 00:00:00 2001 From: venashial Date: Fri, 28 May 2021 22:39:35 -0700 Subject: [PATCH] Remove all uses of `process.env.domain` (#247) * Remove all uses of `process.env.domain` * Remove broken link on logout on revoke token page --- middleware/auth.js | 2 +- pages/dashboard/misc/revoke-token.vue | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/middleware/auth.js b/middleware/auth.js index 12c3e8f16..20aff1549 100644 --- a/middleware/auth.js +++ b/middleware/auth.js @@ -37,7 +37,7 @@ export default async function (context) { if (!context.$auth.user) { return context.redirect( - `${context.$axios.defaults.baseURL}auth/init?url=${process.env.domain}${context.route.fullPath}` + `${context.$axios.defaults.baseURL}auth/init?url=${context.store.app.$config.utils.domain}${context.route.fullPath}` ) } } diff --git a/pages/dashboard/misc/revoke-token.vue b/pages/dashboard/misc/revoke-token.vue index f73e38f4a..ba0e3c1b1 100644 --- a/pages/dashboard/misc/revoke-token.vue +++ b/pages/dashboard/misc/revoke-token.vue @@ -51,11 +51,9 @@ export default { components: {}, methods: { - async logout() { + logout() { this.$cookies.set('auth-token-reset', true) - await this.$router.replace( - `auth/init?url=${process.env.domain}${this.$route.fullPath}` - ) + window.location.href = '/' }, }, }