Files
hub/routes/auth.php
Jon Leopard caf4b8e302 style: auto-fix code style with Laravel Pint
Fixed 222 style issues across 399 files:
- class_definition, braces_position formatting
- concat_space, trailing_comma_in_multiline
- ordered_imports, no_unused_imports
- not_operator_with_successor_space
- no_whitespace_in_blank_line
- single_blank_line_at_eof
- And many more PSR-12/Laravel conventions

All files now pass Laravel Pint code style checks.
2025-10-23 00:01:18 -07:00

38 lines
1.4 KiB
PHP

<?php
use App\Http\Controllers\Auth\PasswordResetLinkController;
use App\Http\Controllers\Auth\UnifiedAuthenticatedSessionController;
use Illuminate\Support\Facades\Route;
/**
* Unified Authentication Routes
*
* This file contains shared/unified auth routes used by both buyers and sellers.
* User-type-specific routes (registration, password reset completion, email verification) are in:
* - routes/buyer_auth.php for buyers
* - routes/seller_auth.php for sellers
*/
// Unified login for all user types (buyers, sellers, admins)
// Automatically routes to /b/dashboard or /s/dashboard based on user_type after authentication
Route::middleware('guest')->group(function () {
Route::get('/login', [UnifiedAuthenticatedSessionController::class, 'create'])
->name('login');
Route::post('/login', [UnifiedAuthenticatedSessionController::class, 'store'])
->name('login.store');
// Unified forgot password - determines user type and sends appropriate reset link
Route::get('/forgot-password', [PasswordResetLinkController::class, 'create'])
->name('password.request');
Route::post('/forgot-password', [PasswordResetLinkController::class, 'store'])
->name('password.email');
});
// Unified logout for all authenticated users
Route::middleware('auth')->group(function () {
Route::post('/logout', [UnifiedAuthenticatedSessionController::class, 'destroy'])
->name('logout');
});