diff --git a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs index e1d7affa1..cd1e4615f 100644 --- a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs +++ b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs @@ -138,10 +138,10 @@ namespace Bit.App.Pages var host = WebUtility.UrlEncode(providerData["Host"] as string); var req = WebUtility.UrlEncode(providerData["Signature"] as string); page.DuoWebView.Uri = $"{_webVaultUrl}/duo-connector.html?host={host}&request={req}"; - page.DuoWebView.RegisterAction(async sig => + page.DuoWebView.RegisterAction(sig => { Token = sig; - await SubmitAsync(); + Device.BeginInvokeOnMainThread(async() => await SubmitAsync()); }); break; case TwoFactorProviderType.Email: @@ -208,7 +208,7 @@ namespace Bit.App.Pages _broadcasterService.Unsubscribe(nameof(TwoFactorPage)); var disableFavicon = await _storageService.GetAsync(Constants.DisableFaviconKey); await _stateService.SaveAsync(Constants.DisableFaviconKey, disableFavicon.GetValueOrDefault()); - Device.BeginInvokeOnMainThread(() => { Application.Current.MainPage = new TabsPage(); }); + Application.Current.MainPage = new TabsPage(); } catch(ApiException e) {