diff --git a/src/views/login/login.vue b/src/views/login/login.vue index 34dbdec..f4b104f 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -3,9 +3,9 @@
- + -
+
{{ T('or login in with') }}
@@ -126,11 +126,17 @@ } const allowRegister = ref(false) + const disablePwd = ref(false) const loadLoginOptions = async () => { try { const res = await loginOptions().catch(_ => false) if (!res || !res.data) return console.error('No valid response received') res.data.ops.map(option => (options.push({ name: option }))) // 创建新的对象数组 + if (res.data.auto_oidc) { + // 如果有自动OIDC登录选项,直接调用第一个 + handleOIDCLogin(res.data.ops[0]) + } + disablePwd.value = res.data.disable_pwd allowRegister.value = res.data.register if (res.data.need_captcha) { loadCaptcha() @@ -288,4 +294,4 @@ h1 { } } } - + \ No newline at end of file