From 14b51b1a7f3e28e92b7202b1fd1c5a649581aa8b Mon Sep 17 00:00:00 2001
From: Matt Portune <59324545+mportune-bw@users.noreply.github.com>
Date: Thu, 9 Sep 2021 10:04:49 -0400
Subject: [PATCH] friendly message for webauthn errors (#1534)
* friendly error message for webauthn error flow
* combine original plus friendly message
* remove redundant phrasing
---
src/App/Pages/Accounts/TwoFactorPageViewModel.cs | 5 +++--
src/App/Resources/AppResources.Designer.cs | 4 ++--
src/App/Resources/AppResources.resx | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs
index 2289e4559..a79a82432 100644
--- a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs
+++ b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs
@@ -242,11 +242,12 @@ namespace Bit.App.Pages
await _deviceActionService.HideLoadingAsync();
if (authResult != null && authResult.Properties.TryGetValue("error", out var resultError))
{
- await _platformUtilsService.ShowDialogAsync(resultError, AppResources.AnErrorHasOccurred);
+ var message = AppResources.Fido2CheckBrowser + "\n\n" + resultError;
+ await _platformUtilsService.ShowDialogAsync(message, AppResources.AnErrorHasOccurred);
}
else
{
- await _platformUtilsService.ShowDialogAsync(AppResources.Fido2SomethingWentWrong,
+ await _platformUtilsService.ShowDialogAsync(AppResources.Fido2CheckBrowser,
AppResources.AnErrorHasOccurred);
}
}
diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs
index 576767f43..7c7ae035d 100644
--- a/src/App/Resources/AppResources.Designer.cs
+++ b/src/App/Resources/AppResources.Designer.cs
@@ -3585,9 +3585,9 @@ namespace Bit.App.Resources {
}
}
- public static string Fido2SomethingWentWrong {
+ public static string Fido2CheckBrowser {
get {
- return ResourceManager.GetString("Fido2SomethingWentWrong", resourceCulture);
+ return ResourceManager.GetString("Fido2CheckBrowser", resourceCulture);
}
}
diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx
index 180109bd3..712c48f19 100644
--- a/src/App/Resources/AppResources.resx
+++ b/src/App/Resources/AppResources.resx
@@ -2028,8 +2028,8 @@
Authenticate WebAuthn
-
- Something Went Wrong. Try again.
+
+ Please make sure your default browser supports WebAuthn and try again.
This organization has an enterprise policy that will automatically enroll you in password reset. Enrollment will allow organization administrators to change your master password.