diff --git a/ui/src/views/system-chat-user/authentication/component/CAS.vue b/ui/src/views/system-chat-user/authentication/component/CAS.vue index feac1c0c6..cd638d742 100644 --- a/ui/src/views/system-chat-user/authentication/component/CAS.vue +++ b/ui/src/views/system-chat-user/authentication/component/CAS.vue @@ -45,7 +45,7 @@
({ id: '', @@ -125,6 +125,9 @@ function getDetail() { } form.value = res.data } + if (!form.value.config.redirectUrl) { + form.value.config.redirectUrl = window.location.origin + window.MaxKB.chatPrefix + '/api/auth/cas' + } }) } diff --git a/ui/src/views/system-chat-user/authentication/component/OAuth2.vue b/ui/src/views/system-chat-user/authentication/component/OAuth2.vue index 5019d7846..7d06d713e 100644 --- a/ui/src/views/system-chat-user/authentication/component/OAuth2.vue +++ b/ui/src/views/system-chat-user/authentication/component/OAuth2.vue @@ -208,6 +208,9 @@ function getDetail() { if (res.data && JSON.stringify(res.data) !== '{}') { form.value = res.data } + if (!form.value.config.redirectUrl) { + form.value.config.redirectUrl = window.location.origin + window.MaxKB.chatPrefix + '/api/auth/oauth2' + } }) } diff --git a/ui/src/views/system-chat-user/authentication/component/OIDC.vue b/ui/src/views/system-chat-user/authentication/component/OIDC.vue index 6807f1ab4..9e8c2c2ff 100644 --- a/ui/src/views/system-chat-user/authentication/component/OIDC.vue +++ b/ui/src/views/system-chat-user/authentication/component/OIDC.vue @@ -219,6 +219,9 @@ 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.chatPrefix + '/api/auth/oidc' + } }) } diff --git a/ui/src/views/system-setting/authentication/component/CAS.vue b/ui/src/views/system-setting/authentication/component/CAS.vue index 58ca80411..e4c4e49d2 100644 --- a/ui/src/views/system-setting/authentication/component/CAS.vue +++ b/ui/src/views/system-setting/authentication/component/CAS.vue @@ -124,6 +124,9 @@ 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' + } } }) } diff --git a/ui/src/views/system-setting/authentication/component/OAuth2.vue b/ui/src/views/system-setting/authentication/component/OAuth2.vue index 98df067d1..b9c595e3d 100644 --- a/ui/src/views/system-setting/authentication/component/OAuth2.vue +++ b/ui/src/views/system-setting/authentication/component/OAuth2.vue @@ -208,6 +208,9 @@ function getDetail() { if (res.data && JSON.stringify(res.data) !== '{}') { form.value = res.data } + if (!form.value.config.redirectUrl){ + 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 04ba7a75b..ce9fd7425 100644 --- a/ui/src/views/system-setting/authentication/component/OIDC.vue +++ b/ui/src/views/system-setting/authentication/component/OIDC.vue @@ -218,6 +218,9 @@ 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' + } } }) } diff --git a/ui/src/views/system/user-manage/index.vue b/ui/src/views/system/user-manage/index.vue index 6c8fcab49..cba788277 100644 --- a/ui/src/views/system/user-manage/index.vue +++ b/ui/src/views/system/user-manage/index.vue @@ -24,6 +24,7 @@ value="is_active" />