- Optimize JWT Auth module to load configuration via `global_args`.
- Decouple configuration-related code from `utils_api.py`, and add a new `config.py` file for unified configuration management.
- Adjust configuration import in `lightrag_server.py`, `auth.py`, and `document_routes.py` to be introduced through `global_args`.
- Use .env from current folder for each lightrag instance
- Allow different .env files for different instances
- Make OS env vars take precedence over .env file
- Add an `accounts` dictionary in `AuthHandler` to store multiple user account information.
- Modify login logic to support multiple user account verification.
- Update environment variable example, add description for `AUTH_ACCOUNTS` variable.
- Adjust authentication status check logic, use `auth_handler.accounts` to determine if authentication is configured.
- Add role-based token system with metadata support
- Implement automatic guest mode for unconfigured authentication
- Create new /auth-status endpoint for authentication status checking
- Modify frontend to auto-detect auth status and bypass login when appropriate
- Add guest mode indicator in site header for better UX
This change allows users to automatically access the system without manual
login when authentication is not configured, while maintaining secure
authentication when credentials are properly set up.
- Modified code layout and formatting in multiple files, improving code readability.
- Updated import statements, removing unused libraries.
- Simplified the writing of some functions and exception handling.
- Removed authentication dependency for the health check endpoint in lightrag_server.py
- Removed the authentication dependency for the entire router in ollama_api.py
- Updated the parameter list and example usage in README.md, removing authentication-related parts
- Removed neo4j and tqdm dependencies from requirements.txt
- Deleted command-line argument parsing code related to authentication from utils_api.py