修复认证验证码投递与登录入口体验 05-27-oa-auth-delivery-wecom-entry-fix
这个提交包含在:
@@ -57,6 +57,19 @@ export async function verifyEmailLoginCode(payload: { email: string; code: strin
|
||||
});
|
||||
}
|
||||
|
||||
export type AuthCapabilities = {
|
||||
emailDelivery: {
|
||||
ready: boolean;
|
||||
statusReasons: string[];
|
||||
};
|
||||
emailLoginCode: {
|
||||
enabled: boolean;
|
||||
};
|
||||
passwordReset: {
|
||||
enabled: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
export type SsoProviderInfo = { id: "oidc"; label: string; enabled: boolean; loginUrl: string };
|
||||
|
||||
export type WecomEntryConfig = {
|
||||
@@ -76,6 +89,10 @@ export async function fetchSsoProviders() {
|
||||
return apiRequestData<SsoProviderInfo[]>("/api/auth/sso/providers", { auth: false });
|
||||
}
|
||||
|
||||
export async function fetchAuthCapabilities() {
|
||||
return apiRequestData<AuthCapabilities>("/api/auth/capabilities", { auth: false });
|
||||
}
|
||||
|
||||
export async function fetchWecomConfig() {
|
||||
return apiRequestData<WecomEntryConfig>("/api/auth/wecom/config", { auth: false });
|
||||
}
|
||||
|
||||
@@ -82,6 +82,10 @@ export function mapApiErrorMessage(
|
||||
return "目标数据不存在或已被删除。";
|
||||
}
|
||||
|
||||
if (code === "SYS_001" && details?.email === "delivery_not_configured") {
|
||||
return "邮件验证码暂不可用,请使用密码登录或联系管理员。";
|
||||
}
|
||||
|
||||
if (code === "SYS_001") {
|
||||
return "服务暂不可用,请稍后重试或联系管理员。";
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户