Skip to content

Commit

Permalink
feat(security): Changed to a generic login error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-meier committed Jun 1, 2024
1 parent e349684 commit da2b85e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Features/Users/UserEndpointBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public static void MapUserEndpoints(this IEndpointRouteBuilder endpoints)
if (!result.Succeeded)
{
return TypedResults.Problem(result.ToString(), statusCode: StatusCodes.Status401Unauthorized);
// Generic error message without hinting whether the credentials were wrong or the user exists/is locked.
return TypedResults.Problem("Login failed.", statusCode: StatusCodes.Status401Unauthorized);
}
// The signInManager already produced the needed response in the form of a cookie or bearer token.
Expand Down

0 comments on commit da2b85e

Please sign in to comment.