Too many login attempts Not work.
Too many login attempts
Please try again in 41 seconds.
Please try again in 41 seconds.

public function authenticate(): ?LoginResponse
{
try {
$this->rateLimit(5);public function authenticate(): ?LoginResponse
{
try {
$this->rateLimit(5);
}
}->login(CustomLogin::class) public function authenticate(): ?LoginResponse
{
try {
$this->rateLimit(5);public function authenticate(): ?LoginResponse
{
try {
$this->rateLimit(5);
}
}->login(CustomLogin::class)<?php
namespace App\Filament\Pages;
use Filament\Forms\Components\Component;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Auth\Login;
use Illuminate\Validation\ValidationException;
class CustomLogin extends Login
{
protected ?string $maxWidth = 'xl';
public function authenticate(): ?LoginResponse
{
try {
$this->rateLimit(3); // This is the part you want to change
} catch (TooManyRequestsException $exception) {
$this->getRateLimitedNotification($exception)?->send();
return null;
}
$data = $this->form->getState();
if (! Filament::auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)) {
$this->throwFailureValidationException();
}
$user = Filament::auth()->user();
if (
($user instanceof FilamentUser) &&
(! $user->canAccessPanel(Filament::getCurrentPanel()))
) {
Filament::auth()->logout();
$this->throwFailureValidationException();
}
session()->regenerate();
return app(LoginResponse::class);
}
}