diff --git a/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs b/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs index f4fa431c119..afc09d4905d 100644 --- a/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs +++ b/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs @@ -100,13 +100,13 @@ public async Task Exchange() // Validate the username/password parameters and ensure the account is not locked out. var result = await _signInManager.CheckPasswordSignInAsync(user, openIdConnectRequest.Password, lockoutOnFailure: true); - var context = new Dictionary() + var context = new Dictionary(StringComparer.OrdinalIgnoreCase) { - { "explicitErrors", _passwordLoginOptions.ExplicitErrors }, + { "detailedErrors", _passwordLoginOptions.DetailedErrors }, { "storeId", openIdConnectRequest.Scope }, }; - foreach (var loginValidation in _userSignInValidators.OrderByDescending(x => x.Priority)) + foreach (var loginValidation in _userSignInValidators.OrderByDescending(x => x.Priority).ThenBy(x => x.GetType().Name)) { var validationErrors = await loginValidation.ValidateUserAsync(user, result, context); var error = validationErrors.FirstOrDefault(); diff --git a/src/VirtoCommerce.Platform.Web/Model/Security/PasswordLoginOptions.cs b/src/VirtoCommerce.Platform.Web/Model/Security/PasswordLoginOptions.cs index 3f7147fe54a..ead7dd047f4 100644 --- a/src/VirtoCommerce.Platform.Web/Model/Security/PasswordLoginOptions.cs +++ b/src/VirtoCommerce.Platform.Web/Model/Security/PasswordLoginOptions.cs @@ -10,7 +10,7 @@ public class PasswordLoginOptions public string AuthenticationType { get; set; } = "Password"; - public bool ExplicitErrors { get; set; } + public bool DetailedErrors { get; set; } public int Priority { get; set; } }