feat: implement comprehensive startup system and fix authentication
Major improvements: - Created startup orchestration system with health monitoring and graceful shutdown - Fixed user registration and login with simplified authentication flow - Rebuilt authentication forms from scratch with direct API integration - Implemented comprehensive debugging and error handling - Added Redis fallback functionality for disabled environments - Fixed CORS configuration for cross-origin frontend requests - Simplified password validation to 6+ characters (removed complexity requirements) - Added toast notifications at app level for better UX feedback - Created comprehensive startup/shutdown scripts with OODA methodology - Fixed database validation and connection issues - Implemented TokenService memory fallback when Redis is disabled Technical details: - New SimpleLoginForm.tsx and SimpleRegisterForm.tsx components - Enhanced CORS middleware with additional allowed origins - Simplified auth validators and removed strict password requirements - Added extensive logging and diagnostic capabilities - Fixed authentication middleware token validation - Implemented graceful Redis error handling throughout the stack - Created modular startup system with configurable health checks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d41d1e8125
commit
e681c446b6
36 changed files with 7719 additions and 183 deletions
|
|
@ -81,7 +81,6 @@ authRoutes.post('/register',
|
|||
sanitizeInput(['email', 'username']),
|
||||
validateAuthRequest(registerPlayerSchema),
|
||||
validateRegistrationUniqueness(),
|
||||
passwordStrengthValidator('password'),
|
||||
authController.register
|
||||
);
|
||||
|
||||
|
|
@ -175,6 +174,14 @@ authRoutes.get('/security-status',
|
|||
authController.getSecurityStatus
|
||||
);
|
||||
|
||||
// Development and diagnostic endpoints (only available in development)
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
authRoutes.get('/debug/registration-test',
|
||||
rateLimiter({ maxRequests: 10, windowMinutes: 5, action: 'diagnostic' }),
|
||||
authController.registrationDiagnostic
|
||||
);
|
||||
}
|
||||
|
||||
// Mount authentication routes
|
||||
router.use('/auth', authRoutes);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue