feat(realdebrid): isolate browser account sessions

This commit is contained in:
Sucukdeluxe
2026-08-15 20:35:34 +02:00
parent af710610fd
commit 53cdac1ded
8 changed files with 605 additions and 93 deletions
+10
View File
@@ -74,6 +74,16 @@ describe("account preload contract", () => {
]);
});
it("forwards account-bound existing and create browser logins", async () => {
await electron.api?.openRealDebridLogin({ accountId: "rdw_existing" });
await electron.api?.openRealDebridLogin({ accountId: "rdw_reserved", create: true });
expect(electron.invoke.mock.calls).toEqual([
[IPC_CHANNELS.OPEN_REALDEBRID_LOGIN, { accountId: "rdw_existing" }],
[IPC_CHANNELS.OPEN_REALDEBRID_LOGIN, { accountId: "rdw_reserved", create: true }]
]);
});
it("reveals a stored secret only through the explicit account channel", async () => {
electron.invoke.mockResolvedValueOnce({ secret: "fixture-revealed-secret-7gH8" });