Why did I not have this message appear?
When you enter the email or password incorrectly more than once
12 Replies
Is this a fresh laravel project? sounds like you have login limiting set
Looks like he's trying the demo
That'll do it then! I assumed it was a clone of the demo site. Dan will have throttled faked logins
When I first created the project, it was working. After a while, I miss it and it disappeared. I don’t know exactly what I did
It doesn't look like you're on your created project, since the brand logo is the filament one and the credentials are the demo ones. A fresh Filament app usually just have "Laravel" in the brand, from your .env.
Are you sure you're actually on your local project here?
yes ,yes this image form demo filamentphp
Unsure what the issue is then. Do you want login throttling in your own app?
I want to show this message in my app
You need to set up throttling then, you can check the demo source code on GitHub: https://github.com/filamentphp/demo
How to set up throttling ?
Seems like the default already throttles attempts for you: https://github.com/filamentphp/filament/blob/3.x/packages/panels/src/Pages/Auth/Login.php#L51-L81
If you want to change this, you need to change the login class used. You can pass it to the
->login()
on the panel provider, but the demo page seems to just use the default throttling.I did it ,dose not work
public function authenticate(): ?LoginResponse { try { $this->rateLimit(5); } catch (TooManyRequestsException $exception) { Notification::make() ->title(('filament-panels::pages/auth/login.notifications.throttled.title', [ 'seconds' => $exception->secondsUntilAvailable, 'minutes' => ceil($exception->secondsUntilAvailable / 60), ])) ->body(array_key_exists('body', ('filament-panels::pages/auth/login.notifications.throttled') ?: []) ? __('filament-panels::pages/auth/login.notifications.throttled.body', [ 'seconds' => $exception->secondsUntilAvailable, 'minutes' => ceil($exception->secondsUntilAvailable / 60), ]) : null) ->danger() ->send(); return null; } // Retrieve form data $data = $this->form->getState(); if ($this->getLdapConnectionModel()?->isEnable == true) { $this->attemptLDAPConnection($data); } else { 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); }