Spaces:
Sleeping
Sleeping
Commit History
-
Fix anonymous sessions and clean up codebase
findEthics- Fixed anonymous session JWT verification for HF Spaces - Changed redirect from /anonymous to / (homepage) - Improved session restoration with automatic fallback - Removed debug/test code (session-test endpoint, console.logs) - Cleaned up unused imports (removed hashlib) - Changed verbose logs to DEBUG level - Added security documentation for CSRF settings - Updated CLAUDE.md with recent fixes and troubleshooting infof77d8aa -
Add anonymous chat access feature
findEthics- Allow users to chat without creating an account - Add choice page for selecting access mode (anonymous vs authenticated) - Implement session-based chat storage for anonymous users - Add rate limiting (20 messages/hour) for anonymous users - Add message length limits (2000 chars) for anonymous users - Update UI to show anonymous user indicators and session warnings - Maintain backward compatibility with existing authenticated flow6ec566b -
Fix session persistence issues for Hugging Face Spaces
findEthics- Make sessions permanent and use remember=True for iframe compatibility - Set SESSION_COOKIE_SAMESITE=None and HTTPONLY=False for HF Spaces - Extend session lifetime to 48 hours for iframe environments - Add comprehensive session debugging in login and chat routes - Add /session-test route to diagnose session issues - Force session.permanent=True before login_user call This should resolve the issue where users are redirected back to login after successful authentication due to session not persisting in the Hugging Face Spaces iframe environment.020f362 -
Disable CSRF protection for Hugging Face Spaces
findEthics- Add WTF_CSRF_ENABLED=False to HuggingFaceConfig - Conditionally enable/disable CSRF protection in app.py - Update templates to conditionally include CSRF tokens - Update deployment checklist with CSRF disabled settings - Add security note about HF Spaces iframe limitations This fixes the 'CSRF session token is missing' error that occurs due to Hugging Face Spaces' iframe/proxy environment where sessions don't work reliably for CSRF token validation.5c85005 -
Fix CSRF token issues for Hugging Face Spaces deployment
findEthics- Add HuggingFaceConfig class with relaxed CSRF/session settings - Disable SESSION_COOKIE_SECURE and WTF_CSRF_SSL_STRICT for HF Spaces - Add enhanced CSRF error handling with debugging - Remove duplicate error handlers - Update deployment checklist with HF-specific configuration - Set FLASK_ENV=huggingface for optimal HF Spaces compatibilitybcc5440 -
Complete user authentication system implementation
findEthics- Add comprehensive user authentication with registration and login - Implement secure password hashing and session management - Add CSRF protection and rate limiting for security - Create MongoDB integration for user accounts and chat history - Add personalized chat history per user - Implement production-ready configuration system - Add comprehensive documentation and deployment guides - Update UI with authentication forms and navigation - Add environment-based configuration management - Include security features: rate limiting, secure sessions, CSRF tokens - Add deployment tools and production readiness checks - Update requirements and documentation for production deploymentf6278c5