1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-04 17:43:17 +00:00

[PM-3379] Fix key rotation on trusted device. (#2680)

This commit is contained in:
André Bispo
2023-08-11 19:10:11 +01:00
committed by GitHub
parent 3f4892fcc8
commit b2df06a7a1
6 changed files with 31 additions and 6 deletions

View File

@@ -226,8 +226,16 @@ namespace Bit.App.Pages
}
else if (await _deviceTrustCryptoService.IsDeviceTrustedAsync())
{
_syncService.FullSyncAsync(true).FireAndForget();
SsoAuthSuccessAction?.Invoke();
if (decryptOptions.TrustedDeviceOption.EncryptedPrivateKey == null && decryptOptions.TrustedDeviceOption.EncryptedUserKey == null)
{
await _deviceTrustCryptoService.RemoveTrustedDeviceAsync();
StartDeviceApprovalOptionsAction?.Invoke();
}
else
{
_syncService.FullSyncAsync(true).FireAndForget();
SsoAuthSuccessAction?.Invoke();
}
}
else if (pendingRequest != null)
{

View File

@@ -349,7 +349,15 @@ namespace Bit.App.Pages
}
else if (await _deviceTrustCryptoService.IsDeviceTrustedAsync())
{
await TwoFactorAuthSuccessAsync();
if (decryptOptions.TrustedDeviceOption.EncryptedPrivateKey == null && decryptOptions.TrustedDeviceOption.EncryptedUserKey == null)
{
await _deviceTrustCryptoService.RemoveTrustedDeviceAsync();
StartDeviceApprovalOptionsAction?.Invoke();
}
else
{
await TwoFactorAuthSuccessAsync();
}
}
else
{