From 380ef261efcdc73a67b10508a1ebf494833c4105 Mon Sep 17 00:00:00 2001 From: MarJose <18107626+MarJose123@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:28:35 +0800 Subject: [PATCH] updated throttle config by adding default value and removing a message on the form if throttle trigger --- src/Http/Livewire/LockerScreen.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Http/Livewire/LockerScreen.php b/src/Http/Livewire/LockerScreen.php index 78ee1d6..37d410e 100644 --- a/src/Http/Livewire/LockerScreen.php +++ b/src/Http/Livewire/LockerScreen.php @@ -64,7 +64,7 @@ public function authenticate() /* * Rate Limit */ - if (config('filament-lockscreen.rate_limit.enable_rate_limit')) { + if (config('filament-lockscreen.rate_limit.enable_rate_limit', true)) { try { $this->rateLimit(config('filament-lockscreen.rate_limit.rate_limit_max_count', 5)); } catch (TooManyRequestsException $exception) { @@ -85,12 +85,6 @@ public function authenticate() $panelId = filament()->getCurrentPanel()->getId(); return redirect()->route("filament.{$panelId}.auth.login"); } - $this->addError( - 'password', __('filament-panels::pages/auth/login.notifications.throttled.title', [ - 'seconds' => $exception->secondsUntilAvailable, - 'minutes' => ceil($exception->secondsUntilAvailable / 60), - ])); - return null; } }