Skip to content

Commit 5b14d62

Browse files
committed
fix: correct redirect URL construction in CAS, OAuth2, and OIDC components
1 parent 2367b87 commit 5b14d62

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ui/src/views/system-setting/authentication/component/CAS.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ function getDetail() {
124124
res.data.config.validateUrl = res.data.config.ldpUri
125125
}
126126
form.value = res.data
127-
if (!form.value.config.redirectUrl) {
128-
form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + 'api/cas'
129-
}
130127
}
128+
if (!form.value.config.redirectUrl) {
129+
form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + '/api/cas'
130+
}
131131
})
132132
}
133133

ui/src/views/system-setting/authentication/component/OAuth2.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function getDetail() {
209209
form.value = res.data
210210
}
211211
if (!form.value.config.redirectUrl) {
212-
form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + 'api/oauth2'
212+
form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + '/api/oauth2'
213213
}
214214
})
215215
}

ui/src/views/system-setting/authentication/component/OIDC.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ function getDetail() {
218218
) {
219219
form.value.config.fieldMapping = '{"username": "preferred_username", "email": "email"}'
220220
}
221-
if (!form.value.config.redirectUrl) {
222-
form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + 'api/oidc'
223-
}
224221
}
222+
if (!form.value.config.redirectUrl) {
223+
form.value.config.redirectUrl = window.location.origin + window.MaxKB.prefix + '/api/oidc'
224+
}
225225
})
226226
}
227227

0 commit comments

Comments
 (0)