mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
fix(X-Pack): 移动端开启 MFA 后使用 CAS、OIDC 无法登录
This commit is contained in:
committed by
fit2cloud-chenyw
parent
d189ab8d00
commit
a57d397245
@@ -143,12 +143,7 @@ const onSubmit = async () => {
|
||||
return
|
||||
}
|
||||
showMfa.value = false
|
||||
if (!isLdap && mfa?.enabled) {
|
||||
for (const key in mfa) {
|
||||
mfaData.value[key] = mfa[key]
|
||||
}
|
||||
showMfa.value = true
|
||||
duringLogin.value = false
|
||||
if (toMfa(mfa)) {
|
||||
return
|
||||
}
|
||||
userStore.setToken(token)
|
||||
@@ -177,6 +172,19 @@ const switchType = type => {
|
||||
const toMain = () => {
|
||||
router.push({ path: '/index' })
|
||||
}
|
||||
const toMfa = (mfa: any) => {
|
||||
const isLdap = loginType.value === 'ldap'
|
||||
if (!isLdap && mfa?.enabled) {
|
||||
for (const key in mfa) {
|
||||
mfaData.value[key] = mfa[key]
|
||||
}
|
||||
showMfa.value = true
|
||||
duringLogin.value = false
|
||||
showPlatLoginMask.value = false
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
const loadFail = () => {
|
||||
xpackLoadFail.value = true
|
||||
showPlatLoginMask.value = false
|
||||
@@ -248,6 +256,7 @@ const loadFail = () => {
|
||||
<XpackComponent
|
||||
jsname="L2NvbXBvbmVudC9sb2dpbi9Nb2JpbGVIYW5kbGVy"
|
||||
@switch-type="switchType"
|
||||
@to-mfa="toMfa"
|
||||
@to-main="toMain"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user