From 53e3429f6d3bebd4a54c2a244353c039c094a3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Sat, 5 Aug 2023 11:39:06 +0100 Subject: [PATCH] [PM-3313] Null email in Approval Options screen (#2664) * [PM-3313] Fix null email in approval options screen --- src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs | 2 +- src/App/Pages/Accounts/LoginSsoPageViewModel.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs b/src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs index dc1843256..240226fe6 100644 --- a/src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs +++ b/src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs @@ -111,7 +111,7 @@ namespace Bit.App.Pages { try { - Email = await _stateService.GetRememberedEmailAsync(); + Email = await _stateService.GetActiveUserEmailAsync(); var decryptOptions = await _stateService.GetAccountDecryptionOptions(); RequestAdminApprovalEnabled = decryptOptions?.TrustedDeviceOption?.HasAdminApproval ?? false; ApproveWithMasterPasswordEnabled = decryptOptions?.HasMasterPassword ?? false; diff --git a/src/App/Pages/Accounts/LoginSsoPageViewModel.cs b/src/App/Pages/Accounts/LoginSsoPageViewModel.cs index 60b5dbd91..ad474820c 100644 --- a/src/App/Pages/Accounts/LoginSsoPageViewModel.cs +++ b/src/App/Pages/Accounts/LoginSsoPageViewModel.cs @@ -149,7 +149,6 @@ namespace Bit.App.Pages authResult = await WebAuthenticator.AuthenticateAsync(new Uri(url), new Uri(REDIRECT_URI)); - var code = GetResultCode(authResult, state); if (!string.IsNullOrEmpty(code)) {