From 92f71e4f830ff410b9cc063eb63e16aa7bf617c8 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Mon, 17 Jun 2024 12:28:35 -0400 Subject: [PATCH] [PM-8865] Reset "should trust device" state to null (#9639) --- .../src/auth/services/device-trust.service.implementation.ts | 2 +- libs/common/src/auth/services/device-trust.service.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 () => {