diff --git a/AGENTS.md b/AGENTS.md index f43ea7d69..ad10a2564 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -156,7 +156,7 @@ Requires `.env` keys: TMDB, TVDB, TVMaze, Trakt, OMDB (TV/Movies); IGDB, GiantBo Blade + TailwindCSS v4 + Vite bundling. Run `npm run build` after changes. -- **Livewire 3**: Used by the forum package, the Spatie Pulse dashboard (`resources/views/vendor/pulse/`), and the auth login form (`app/Livewire/Forms/LoginForm.php`, `app/Livewire/Actions/Logout.php`). Most pages remain plain Blade + Alpine. +- **Livewire 3**: Used only by the forum package (`resources/forum/livewire-tailwind/`) and the vendored Spatie Pulse dashboard views (`resources/views/vendor/pulse/`). All application pages (auth, profile, admin, browse, etc.) are plain Blade + Alpine. - **Alpine.js**: CSP-safe build with component architecture in `resources/js/alpine/` - Core components loaded eagerly in `alpine/index.js` - Page-specific components lazy-loaded via `alpine/lazy-loader.js` diff --git a/app/Livewire/Actions/Logout.php b/app/Livewire/Actions/Logout.php deleted file mode 100644 index ebe009ea9..000000000 --- a/app/Livewire/Actions/Logout.php +++ /dev/null @@ -1,22 +0,0 @@ -logout(); - - Session::invalidate(); - Session::regenerateToken(); - } -} diff --git a/app/Livewire/Forms/LoginForm.php b/app/Livewire/Forms/LoginForm.php deleted file mode 100644 index dbcbd5cf3..000000000 --- a/app/Livewire/Forms/LoginForm.php +++ /dev/null @@ -1,74 +0,0 @@ -ensureIsNotRateLimited(); - - if (! Auth::attempt($this->only(['email', 'password']), $this->remember)) { - RateLimiter::hit($this->throttleKey()); - - throw ValidationException::withMessages([ - 'form.email' => trans('auth.failed'), - ]); - } - - RateLimiter::clear($this->throttleKey()); - } - - /** - * Ensure the authentication request is not rate limited. - */ - protected function ensureIsNotRateLimited(): void - { - if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { - return; - } - - event(new Lockout(request())); - - $seconds = RateLimiter::availableIn($this->throttleKey()); - - throw ValidationException::withMessages([ - 'form.email' => trans('auth.throttle', [ - 'seconds' => $seconds, - 'minutes' => ceil($seconds / 60), - ]), - ]); - } - - /** - * Get the authentication rate limiting throttle key. - */ - protected function throttleKey(): string - { - return Str::transliterate(Str::lower($this->email).'|'.request()->ip()); - } -}