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 = '/' }, }, }