friendly message for webauthn errors (#1534)

* friendly error message for webauthn error flow

* combine original plus friendly message

* remove redundant phrasing
This commit is contained in:
Matt Portune 2021-09-09 10:04:49 -04:00 committed by GitHub
parent 4667a9d643
commit 14b51b1a7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -2028,8 +2028,8 @@
<data name="Fido2AuthenticateWebAuthn" xml:space="preserve">
<value>Authenticate WebAuthn</value>
</data>
<data name="Fido2SomethingWentWrong" xml:space="preserve">
<value>Something Went Wrong. Try again.</value>
<data name="Fido2CheckBrowser" xml:space="preserve">
<value>Please make sure your default browser supports WebAuthn and try again.</value>
</data>
<data name="ResetPasswordAutoEnrollInviteWarning" xml:space="preserve">
<value>This organization has an enterprise policy that will automatically enroll you in password reset. Enrollment will allow organization administrators to change your master password.</value>