fix: set default redirect URLs for CAS, OAuth2, and OIDC configurations

This commit is contained in:
wxg0103 2025-07-29 16:36:19 +08:00
parent b3fa1e559a
commit 7205c7fda7
7 changed files with 22 additions and 3 deletions

View File

@ -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'
}
})
}

View File

@ -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'
}
})
}

View File

@ -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'
}
})
}

View File

@ -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'
}
}
})
}

View File

@ -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'
}
})
}

View File

@ -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'
}
}
})
}

View File

@ -24,6 +24,7 @@
value="is_active"
/>
<el-option
v-if="user.isEE() || user.isPE()"
:label="$t('views.userManage.source.label')"
value="source"
/>