提交 6469d014 authored 作者: vipcxj's avatar vipcxj

修复同时多种方式登录处理逻辑有误

上级 44c67e4c
...@@ -118,9 +118,18 @@ export default { ...@@ -118,9 +118,18 @@ export default {
let response; let response;
if (password) { if (password) {
response = yield call(authorize, yield call(passValidate, password, encrypt(tkId))); response = yield call(authorize, yield call(passValidate, password, encrypt(tkId)));
} else if (uca) { const { status } = response;
if (status !== 'authed' && status !== 'skipped') {
throw errors.wrongPassword();
}
}
if (uca) {
if (uca.status === 0) { if (uca.status === 0) {
response = yield call(authorize, yield call(ucaValidate, uca.signed, encrypt(tkId))); response = yield call(authorize, yield call(ucaValidate, uca.signed, encrypt(tkId)));
const { status } = response;
if (status !== 'authed' && status !== 'skipped') {
throw errors.generalError('证书验证失败。');
}
} else { } else {
throw errors.generalError(uca.error); throw errors.generalError(uca.error);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论