From 5b14d628295c0fdc9ee4c49b3306d8825bd4d519 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 7 Aug 2025 11:35:59 +0800 Subject: [PATCH] fix: correct redirect URL construction in CAS, OAuth2, and OIDC components --- .../views/system-setting/authentication/component/CAS.vue | 6 +++--- .../system-setting/authentication/component/OAuth2.vue | 2 +- .../views/system-setting/authentication/component/OIDC.vue | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/src/views/system-setting/authentication/component/CAS.vue b/ui/src/views/system-setting/authentication/component/CAS.vue index 9f353660e..c2274adbf 100644 --- a/ui/src/views/system-setting/authentication/component/CAS.vue +++ b/ui/src/views/system-setting/authentication/component/CAS.vue @@ -124,10 +124,10 @@ function getDetail() { res.data.config.validateUrl = res.data.config.ldpUri } form.value = res.data - if (!form.value.config.redirectUrl) { - form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + 'api/cas' - } } + if (!form.value.config.redirectUrl) { + form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + '/api/cas' + } }) } diff --git a/ui/src/views/system-setting/authentication/component/OAuth2.vue b/ui/src/views/system-setting/authentication/component/OAuth2.vue index f043de33e..9b0131caf 100644 --- a/ui/src/views/system-setting/authentication/component/OAuth2.vue +++ b/ui/src/views/system-setting/authentication/component/OAuth2.vue @@ -209,7 +209,7 @@ function getDetail() { form.value = res.data } if (!form.value.config.redirectUrl) { - form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + 'api/oauth2' + form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + '/api/oauth2' } }) } diff --git a/ui/src/views/system-setting/authentication/component/OIDC.vue b/ui/src/views/system-setting/authentication/component/OIDC.vue index 77c6a01d1..7c42270e4 100644 --- a/ui/src/views/system-setting/authentication/component/OIDC.vue +++ b/ui/src/views/system-setting/authentication/component/OIDC.vue @@ -218,10 +218,10 @@ function getDetail() { ) { form.value.config.fieldMapping = '{"username": "preferred_username", "email": "email"}' } - if (!form.value.config.redirectUrl) { - form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + 'api/oidc' - } } + if (!form.value.config.redirectUrl) { + form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + '/api/oidc' + } }) }