Merge cookie normalization into QQ session renewal

This commit is contained in:
TIANYAO ZHANG committed 2026-11-18 16:43:49 +08:00
commit 9928035282
13 files changed
+342 -20

No files matched your search

+8
View File
@@ -124,6 +124,14 @@ describe("managed QQ authentication routes", () => {
expect(refresh).not.toHaveBeenCalled();
});
it("keeps the current QQ login when an import contains only response attributes", async () => {
const { app, qq } = mount(true);
await request(app).post("/api/auth/cookie")
.send({ platform: "qq", cookie: "Path=/; HttpOnly" })
.expect(400);
expect(qq.setCookie).not.toHaveBeenCalled();
});
it("continues persisting the legacy cookie when the feature is disabled", async () => {
const { app, legacyStore } = mount(false);
await request(app).get("/api/auth/qrcode/status").query({ platform: "qq", key: "legacy" }).expect(200);