| | |
| | | Route::for('auth/status') |
| | | ->get([$this, 'getAuthStatus']) |
| | | ->auth('public') |
| | | ->rateLimit(); |
| | | ->rateLimit() |
| | | ->register(); |
| | | |
| | | // Standard login |
| | | Route::for('auth/login') |
| | |
| | | 'redirect_to' => 'string', |
| | | ]) |
| | | ->auth('public') |
| | | ->rateLimit(5, 300); |
| | | ->rateLimit(5, 300) |
| | | ->register(); |
| | | |
| | | // User registration |
| | | Route::for('auth/register') |
| | |
| | | 'redirect_to' => 'string', |
| | | ]) |
| | | ->auth('public') |
| | | ->rateLimit(3, 3600); |
| | | ->rateLimit(3, 3600) |
| | | ->register(); |
| | | |
| | | // Request password reset |
| | | Route::for('auth/lostpassword') |
| | |
| | | 'user_email' => 'email|required', |
| | | ]) |
| | | ->auth('public') |
| | | ->rateLimit(3, 3600); |
| | | ->rateLimit(3, 3600) |
| | | ->register(); |
| | | |
| | | // Reset password with token |
| | | Route::for('auth/resetpass') |
| | |
| | | 'pass2' => 'string|required', |
| | | ]) |
| | | ->auth('public') |
| | | ->rateLimit(5, 300); |
| | | ->rateLimit(5, 300) |
| | | ->register(); |
| | | |
| | | // Magic link endpoint |
| | | if ($this->hasMagicLink) { |
| | |
| | | 'redirect_to' => 'string', |
| | | ]) |
| | | ->auth('public') |
| | | ->rateLimit(5, 3600); |
| | | ->rateLimit(5, 3600) |
| | | ->register(); |
| | | } |
| | | |
| | | // Logout endpoint |
| | | Route::for('auth/logout') |
| | | ->post([$this, 'handleLogout']) |
| | | ->auth('logged_in') |
| | | ->rateLimit(10, 60); |
| | | |
| | | error_log('=================== LOGIN ROUTES REGISTERED ==================='); |
| | | ->rateLimit(10) |
| | | ->register(); |
| | | } |
| | | |
| | | /** |