From 156764063471d71c5d3cabe0dc1d5af0f8e268eb Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Wed, 14 Aug 2024 14:30:14 +0200 Subject: [PATCH] fix logout stuff --- MusicPlayerV2-GUI/src/views/AppView.vue | 3 +-- MusicPlayerV2-GUI/src/views/GetView.vue | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MusicPlayerV2-GUI/src/views/AppView.vue b/MusicPlayerV2-GUI/src/views/AppView.vue index 86c4c53..ff26802 100644 --- a/MusicPlayerV2-GUI/src/views/AppView.vue +++ b/MusicPlayerV2-GUI/src/views/AppView.vue @@ -100,8 +100,7 @@ } ); const logout = () => { - location.href = 'http://localhost:8080/logout?return=http://localhost:8081'; - // location.href = 'https://id.janishutz.com/logout?return=https://music.janishutz.com'; + location.href = localStorage.getItem( 'url' ) + '/logout?return=' + location.href; } diff --git a/MusicPlayerV2-GUI/src/views/GetView.vue b/MusicPlayerV2-GUI/src/views/GetView.vue index c6c2804..271caae 100644 --- a/MusicPlayerV2-GUI/src/views/GetView.vue +++ b/MusicPlayerV2-GUI/src/views/GetView.vue @@ -8,6 +8,7 @@
Subscribe Log in + GitHub
@@ -39,6 +40,10 @@ } ); const reasonForRedirectHere = ref( sessionStorage.getItem( 'getRedirectionReason' ) ); sessionStorage.removeItem( 'getRedirectionReason' ); + + const logout = () => { + location.href = localStorage.getItem( 'url' ) + '/logout?return=' + location.href; + }