Release v1.0.0 #16

Merged
Wesser merged 492 commits from release/v1.0.0 into master 2025-02-12 09:19:32 +03:00
282 changed files with 14724 additions and 99 deletions
Showing only changes of commit dfac9ddca8 - Show all commits

View File

@ -156,8 +156,13 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I
var totp = new TotpService(firstTokenAuth.Secret); var totp = new TotpService(firstTokenAuth.Secret);
if (!totp.VerifyToken(code)) if (!totp.VerifyToken(code))
{
await RecordFailedLoginAttempt(requestContext.Fingerprint, firstTokenAuth.UserId, cancellation);
throw new SecurityException("Invalid verification code. Please try again."); throw new SecurityException("Invalid verification code. Please try again.");
} }
await ResetFailedLoginAttempts(requestContext.Fingerprint, cancellation);
}
break; break;
default: default:
throw new InvalidOperationException("Unsupported authorization method."); throw new InvalidOperationException("Unsupported authorization method.");