From 889d9efe99bb12058b1514f4aca0a0cea041fe64 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 7 Sep 2026 20:30:54 +0930 Subject: [PATCH] Replace Auth::routes() with explicit auth route definitions Expand the laravel/ui Auth::routes() helper into explicit route definitions for login, logout, registration and password reset. This removes the routing magic, makes every auth route visible in web.php, and lets the honeypot ProtectAgainstSpam middleware live directly on the single POST /register definition instead of a duplicate route. laravel/ui is retained since the Auth controllers still rely on its Illuminate\Foundation\Auth traits. --- routes/web.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 811bb97e1..cb815f388 100644 --- a/routes/web.php +++ b/routes/web.php @@ -4,7 +4,10 @@ use App\Http\Controllers\AccountController; use App\Http\Controllers\AccountInterstitialController; use App\Http\Controllers\AdminInviteController; use App\Http\Controllers\AppRegisterController; +use App\Http\Controllers\Auth\ForgotPasswordController; +use App\Http\Controllers\Auth\LoginController; use App\Http\Controllers\Auth\RegisterController; +use App\Http\Controllers\Auth\ResetPasswordController; use App\Http\Controllers\AuthorizeInteractionController; use App\Http\Controllers\AvatarController; use App\Http\Controllers\BookmarkController; @@ -63,10 +66,17 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact Route::get('web/explore', [LandingController::class, 'exploreRedirect']); Route::get('authorize_interaction', [AuthorizeInteractionController::class, 'get']); - Auth::routes(); - + Route::get('register', [RegisterController::class, 'showRegistrationForm'])->name('register'); Route::post('register', [RegisterController::class, 'register'])->middleware(ProtectAgainstSpam::class); + Route::get('login', [LoginController::class, 'showLoginForm'])->name('login'); + Route::post('login', [LoginController::class, 'login']); + Route::post('logout', [LoginController::class, 'logout'])->name('logout'); + Route::get('password/reset', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('password.request'); + Route::post('password/email', [ForgotPasswordController::class, 'sendResetLinkEmail'])->name('password.email'); + Route::get('password/reset/{token}', [ResetPasswordController::class, 'showResetForm'])->name('password.reset'); + Route::post('password/reset', [ResetPasswordController::class, 'reset'])->name('password.update'); + Route::get('auth/oidc/start', [RemoteOidcController::class, 'start']); Route::get('auth/oidc/callback', [RemoteOidcController::class, 'handleCallback']);