feat: 数字人前台仅使用谷歌登录

- 校验 Firebase 身份并映射数字人账号
- 关闭数字人密码和游客入口,拒绝旧会话
This commit is contained in:
湛兮
2026-11-13 22:07:01 +08:00
parent 1b037f4e6c
commit 595614137c
12 changed files with 1222 additions and 207 deletions
+2 -5
View File
@@ -1,8 +1,5 @@
/** 管理员、员工与 C 端身份分别校验,禁止按同名账号跨体系回退。 */
import {
currentDigitalUser,
changeDigitalPassword,
} from "../digital/digital.users";
import { currentDigitalUser } from "../digital/digital.users";
import { badRequest, forbidden, unauthorized } from "../../shared/http-error";
import { authRepository } from "./auth.repository";
import type {
@@ -238,7 +235,7 @@ export const authService = {
meta: { ip?: string | null; userAgent?: string | null },
): Promise<AuthUser> {
if (payload.accountType === "DIGITAL_USER")
return changeDigitalPassword(payload, input);
throw forbidden("请在 Google 账号中管理密码");
if (payload.accountType !== "EMPLOYEE" || !payload.employeeId) {
throw forbidden("超级管理员暂不通过员工端接口修改密码");
}