fix: replace route closures with controllers, add Argon2id password migration

- Replace closures in web.php and auth.php with dedicated controllers
  (LoginRedirectController, LogoutController, TwoFactorChallengeController,
  EmailVerificationController) to fix route caching issues
- Add migration to increase password column to VARCHAR(255) for Argon2id support
- Fix 500 error caused by route cache incompatibility with closures
This commit is contained in:
root
2026-05-20 23:40:18 +02:00
parent 75b78c17fa
commit 1fe8d10c90
7 changed files with 106 additions and 14 deletions
+5 -6
View File
@@ -1,6 +1,8 @@
<?php
use App\Http\Controllers\Auth\EmailVerificationController;
use App\Http\Controllers\Auth\SocialAuthController;
use App\Http\Controllers\Auth\TwoFactorChallengeController;
use Illuminate\Support\Facades\Route;
use Laravel\Fortify\Features;
use Laravel\Fortify\Http\Controllers\RegisteredUserController;
@@ -38,14 +40,11 @@ Route::middleware(['guest', 'throttle:60,1'])->group(function () {
});
// Two factor challenge login
Route::get('/two-factor-challenge', static fn () => view('auth.two-factor-challenge'))->name('two-factor.login');
Route::get('/two-factor-challenge', TwoFactorChallengeController::class)->name('two-factor.login');
// Email verification resend
Route::post('/email/verification-notification', static function () {
request()->user()->sendEmailVerificationNotification();
return back()->with('status', 'verification-link-sent');
})->middleware(['auth', 'throttle:6,1'])->name('verification.send');
Route::post('/email/verification-notification', EmailVerificationController::class)
->middleware(['auth', 'throttle:6,1'])->name('verification.send');
// Two factor challenge with throttle
if (Features::enabled(Features::twoFactorAuthentication())) {