Merge remote-tracking branch 'origin/main' into audit/snapshot-gallery

This commit is contained in:
Arnaud Dartois committed 2026-10-20 07:41:41 +02:00
commit b3a705bc87
51 files changed
+6714 -245

No files matched your search

@@ -85,17 +85,17 @@ public class AuthController : ControllerBase
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
public async Task<IActionResult> Verify2fa([FromBody] Verify2faRequest request, CancellationToken ct)
{
_logger.LogInformation("2FA verification attempt for {Email}", request.Email);
var command = new Verify2faCommand(request.Email, request.Code);
_logger.LogInformation("2FA verification attempt");
var command = new Verify2faCommand(request.ChallengeId, request.Code);
var result = await _mediator.Send(command, ct);
if (result.IsSuccess)
{
_logger.LogInformation("2FA verification successful for {Email}", request.Email);
_logger.LogInformation("2FA verification successful");
return Ok(result.Data);
}
_logger.LogWarning("2FA verification failed for {Email}: {Error}", request.Email, result.Error);
_logger.LogWarning("2FA verification failed: {Error}", result.Error);
return StatusCode(result.StatusCode ?? 401, new { error = result.Error });
}