From 8c14b9fde53c5b7d47b77c0a5d75eda79a23a921 Mon Sep 17 00:00:00 2001 From: SebClem Date: Sun, 12 Jun 2022 18:12:12 +0200 Subject: [PATCH] :ambulance: Fix login not redirect to home page --- src/components/Header/HeaderComponent.vue | 7 ++++++- src/views/oauth/OauthRedirectView.vue | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Header/HeaderComponent.vue b/src/components/Header/HeaderComponent.vue index de6ed7a..75b08cc 100644 --- a/src/components/Header/HeaderComponent.vue +++ b/src/components/Header/HeaderComponent.vue @@ -19,7 +19,7 @@ @@ -44,6 +44,11 @@ function getAvatar() { const avatarBaseUrl = import.meta.env.VITE_DISCORD_USER_AVATAR_URL; return avatarBaseUrl + userStore.discordId + "/" + avatar.value + ".png"; } + +function logoutAndRedirect() { + logout(false, false); + window.location.assign("/"); +} diff --git a/src/views/oauth/OauthRedirectView.vue b/src/views/oauth/OauthRedirectView.vue index 93b8f30..f6f12ed 100644 --- a/src/views/oauth/OauthRedirectView.vue +++ b/src/views/oauth/OauthRedirectView.vue @@ -12,8 +12,7 @@