diff --git a/libs/common/src/auth/services/device-trust.service.implementation.ts b/libs/common/src/auth/services/device-trust.service.implementation.ts index 242a748095..51461e653b 100644 --- a/libs/common/src/auth/services/device-trust.service.implementation.ts +++ b/libs/common/src/auth/services/device-trust.service.implementation.ts @@ -102,7 +102,7 @@ export class DeviceTrustService implements DeviceTrustServiceAbstraction { if (shouldTrustDevice) { await this.trustDevice(userId); // reset the trust choice - await this.setShouldTrustDevice(userId, false); + await this.setShouldTrustDevice(userId, null); } } diff --git a/libs/common/src/auth/services/device-trust.service.spec.ts b/libs/common/src/auth/services/device-trust.service.spec.ts index 1527870cb4..7cc4de8b2d 100644 --- a/libs/common/src/auth/services/device-trust.service.spec.ts +++ b/libs/common/src/auth/services/device-trust.service.spec.ts @@ -115,7 +115,7 @@ describe("deviceTrustService", () => { expect(deviceTrustService.getShouldTrustDevice).toHaveBeenCalledTimes(1); expect(deviceTrustService.trustDevice).toHaveBeenCalledTimes(1); - expect(deviceTrustService.setShouldTrustDevice).toHaveBeenCalledWith(mockUserId, false); + expect(deviceTrustService.setShouldTrustDevice).toHaveBeenCalledWith(mockUserId, null); }); it("should not trust device nor reset when getShouldTrustDevice returns false", async () => {