deleteFailedLoginAttempts method
Cleans up the log of failed login attempts older than olderThan.
If olderThan is null, this will remove all attempts outside the time
window that is checked upon login, as configured in
EmailIdpConfig.failedLoginRateLimit.
If email is provided, only attempts for the given email will be deleted.
Implementation
Future<void> deleteFailedLoginAttempts(
Session session, {
Duration? olderThan,
String? email,
required Transaction transaction,
}) async {
await _rateLimitUtil.deleteAttempts(
session,
olderThan: olderThan ?? _rateLimitUtil.config.timeframe,
key: email,
transaction: transaction,
);
}