From 5fdf8e60451049ce1a005ee5eb64f6220528603a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 5 Nov 2019 09:03:48 -0500 Subject: [PATCH] set fingerprint lock prop on login --- src/Core/Services/AuthService.cs | 4 ++++ src/Core/Utilities/ServiceContainer.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Core/Services/AuthService.cs b/src/Core/Services/AuthService.cs index 73ce0653c..f02769077 100644 --- a/src/Core/Services/AuthService.cs +++ b/src/Core/Services/AuthService.cs @@ -19,6 +19,7 @@ namespace Bit.Core.Services private readonly II18nService _i18nService; private readonly IPlatformUtilsService _platformUtilsService; private readonly IMessagingService _messagingService; + private readonly ILockService _lockService; private readonly bool _setCryptoKeys; private SymmetricCryptoKey _key; @@ -34,6 +35,7 @@ namespace Bit.Core.Services II18nService i18nService, IPlatformUtilsService platformUtilsService, IMessagingService messagingService, + ILockService lockService, bool setCryptoKeys = true) { _cryptoService = cryptoService; @@ -44,6 +46,7 @@ namespace Bit.Core.Services _i18nService = i18nService; _platformUtilsService = platformUtilsService; _messagingService = messagingService; + _lockService = lockService; _setCryptoKeys = setCryptoKeys; TwoFactorProviders = new Dictionary(); @@ -312,6 +315,7 @@ namespace Bit.Core.Services await _cryptoService.SetEncPrivateKeyAsync(tokenResponse.PrivateKey); } + _lockService.FingerprintLocked = false; _messagingService.Send("loggedIn"); return result; } diff --git a/src/Core/Utilities/ServiceContainer.cs b/src/Core/Utilities/ServiceContainer.cs index 6d0d330a0..8f35f7898 100644 --- a/src/Core/Utilities/ServiceContainer.cs +++ b/src/Core/Utilities/ServiceContainer.cs @@ -57,7 +57,7 @@ namespace Bit.Core.Utilities cryptoFunctionService); var totpService = new TotpService(storageService, cryptoFunctionService); var authService = new AuthService(cryptoService, apiService, userService, tokenService, appIdService, - i18nService, platformUtilsService, messagingService); + i18nService, platformUtilsService, messagingService, lockService); // TODO: export service var auditService = new AuditService(cryptoFunctionService, apiService); var environmentService = new EnvironmentService(apiService, storageService);