1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-23 11:45:38 +01:00

set fingerprint lock prop on login

This commit is contained in:
Kyle Spearrin 2019-11-05 09:03:48 -05:00
parent d9907cdbeb
commit 5fdf8e6045
2 changed files with 5 additions and 1 deletions

View File

@ -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<TwoFactorProviderType, TwoFactorProvider>();
@ -312,6 +315,7 @@ namespace Bit.Core.Services
await _cryptoService.SetEncPrivateKeyAsync(tokenResponse.PrivateKey);
}
_lockService.FingerprintLocked = false;
_messagingService.Send("loggedIn");
return result;
}

View File

@ -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);