Skip to content

Commit

Permalink
updated throttle config by adding default value and removing a messag…
Browse files Browse the repository at this point in the history
…e on the form if throttle trigger
  • Loading branch information
MarJose123 committed Aug 22, 2023
1 parent 0f6f4f2 commit 380ef26
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Http/Livewire/LockerScreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 380ef26

Please sign in to comment.