diff --git a/src/App/Pages/Accounts/LockPage.xaml.cs b/src/App/Pages/Accounts/LockPage.xaml.cs index d62b4c6b2..f19d41f40 100644 --- a/src/App/Pages/Accounts/LockPage.xaml.cs +++ b/src/App/Pages/Accounts/LockPage.xaml.cs @@ -20,13 +20,14 @@ namespace Bit.App.Pages private bool _promptedAfterResume; private bool _appeared; - public LockPage(AppOptions appOptions = null, bool autoPromptBiometric = true) + public LockPage(AppOptions appOptions = null, bool autoPromptBiometric = true, bool checkPendingAuthRequests = true) { _appOptions = appOptions; _autoPromptBiometric = autoPromptBiometric; InitializeComponent(); _broadcasterService = ServiceContainer.Resolve(); _vm = BindingContext as LockPageViewModel; + _vm.CheckPendingAuthRequests = checkPendingAuthRequests; _vm.Page = this; _vm.UnlockedAction = () => Device.BeginInvokeOnMainThread(async () => await UnlockedAsync()); diff --git a/src/App/Pages/Accounts/LockPageViewModel.cs b/src/App/Pages/Accounts/LockPageViewModel.cs index 6b9137322..f283964df 100644 --- a/src/App/Pages/Accounts/LockPageViewModel.cs +++ b/src/App/Pages/Accounts/LockPageViewModel.cs @@ -149,6 +149,8 @@ namespace Bit.App.Pages set => SetProperty(ref _lockedVerifyText, value); } + public bool CheckPendingAuthRequests { get; set; } + public AccountSwitchingOverlayViewModel AccountSwitchingOverlayViewModel { get; } public Command SubmitCommand { get; } @@ -165,7 +167,7 @@ namespace Bit.App.Pages public async Task InitAsync() { var pendingRequest = await _stateService.GetPendingAdminAuthRequestAsync(); - if (pendingRequest != null) + if (pendingRequest != null && CheckPendingAuthRequests) { await _vaultTimeoutService.LogOutAsync(); return; diff --git a/src/App/Pages/Accounts/LoginApproveDevicePage.xaml.cs b/src/App/Pages/Accounts/LoginApproveDevicePage.xaml.cs index 5f3e0a88b..1509a92f0 100644 --- a/src/App/Pages/Accounts/LoginApproveDevicePage.xaml.cs +++ b/src/App/Pages/Accounts/LoginApproveDevicePage.xaml.cs @@ -44,7 +44,7 @@ namespace Bit.App.Pages private async Task StartLogInWithMasterPasswordAsync() { - var page = new LockPage(_appOptions); + var page = new LockPage(_appOptions, checkPendingAuthRequests: false); await Navigation.PushModalAsync(new NavigationPage(page)); } diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 89656666c..ef128b045 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -2756,5 +2756,4 @@ Do you want to switch to this account? Log in with device must be set up in the settings of the Bitwarden app. Need another option? -