feat(api): 添加或删除 passkey、修改邮箱前须 5 分钟内用已有因子重新验证,变更后邮件通知账户,面板加确认对话框与修改邮箱入口

This commit is contained in:
Lemon-miaow committed 2026-09-25 14:47:54 +08:00
1 parent 9e7f23ca13
commit d3769b5c31
36 files changed
+2735 -288

No files matched your search

+12
View File
@@ -1015,4 +1015,16 @@ describe("copy for the generic server codes", () => {
expect(err.status).toBe(0);
expect(humanizeError(err)).toBe("The browser returned no passkey. Try again.");
});
it("words the re-authentication refusals", () => {
expect(humanizeError({ status: 403, code: "reauth_required", message: "raw" })).toBe(
"Confirm it's you first: this change needs your Passkey or an email code from the last few minutes.",
);
expect(humanizeError({ status: 403, code: "staff_reauth", message: "raw" })).toBe(
"Operator accounts confirm with a Passkey or by signing in again.",
);
expect(humanizeError({ status: 400, code: "no_session", message: "raw" })).toBe(
"This only works in a browser signed in to Felis.",
);
});
});