mirror of
https://github.com/hanzoai/chat.git
synced 2026-09-30 20:51:17 +00:00
- Added HanzoIAMSSOHandler class for Hanzo IAM authentication - Integrated Hanzo IAM as an SSO provider alongside Google, Microsoft, and generic SSO - Updated login UI from 'LiteLLM' to 'Hanzo Router' branding - Changed error messages to reference Hanzo Router instead of LiteLLM - Added .env.hanzo-iam.example configuration file - Updated environment variable from LITELLM_MASTER_KEY to ROUTER_MASTER_KEY (with backward compatibility) - Added support for HANZO_IAM_CLIENT_ID, HANZO_IAM_CLIENT_SECRET, and HANZO_IAM_SERVER_URL - Maintained compatibility with existing authentication methods (built-in auth and other SSO providers)
2.4 KiB
2.4 KiB
Hanzo Chat Demo Setup Guide
Quick Start
Since the chat application starts with no users, you'll need to register your first account.
Option 1: Register via Web UI (Recommended)
- Navigate to http://localhost:3081
- Click "Sign up" or "Register" link
- Create an account with:
- Admin Demo:
- Email:
[email protected] - Password:
demo1234
- Email:
- Regular Demo User:
- Email:
[email protected] - Password:
demo1234
- Email:
- Admin Demo:
Option 2: Create Users via MongoDB
If you need to create demo users programmatically:
# Access MongoDB shell
docker exec -it hanzo-mongodb mongosh mongodb://hanzo:hanzo123@localhost:27017/HanzoChat?authSource=admin
# Create demo admin user
db.users.insertOne({
email: "[email protected]",
username: "admin",
name: "Hanzo Admin",
password: "$2a$10$hashed_password_here", // Use bcrypt to hash "demo1234"
role: "ADMIN",
isVerified: true,
emailVerified: true,
createdAt: new Date(),
updatedAt: new Date(),
refreshToken: [],
plugins: []
});
Option 3: Environment Configuration
To show demo credentials on the login page when running locally, add to your .env:
# Show demo credentials on login page (development only)
SHOW_DEMO_CREDENTIALS=true
DEMO_EMAIL=[email protected]
DEMO_PASSWORD=demo1234
Features Available After Login
Once logged in, you'll have access to:
- MCP Tools: File operations, search, code analysis
- Agent Features: Multi-agent workflows via Hanzo Agent SDK
- LLM Gateway: Access to 100+ AI providers through unified interface
- Custom Branding: Hanzo AI themed interface
Troubleshooting
Registration Not Working?
- Ensure
ALLOW_REGISTRATION=trueis set in environment - Check MongoDB is running:
docker ps | grep mongodb - Check logs:
docker logs hanzo-chat
Login Issues?
- Clear browser cookies for localhost:3081
- Verify user exists in database using MongoDB commands above
- Check JWT secrets are properly set in environment
MCP Tools Not Showing?
- Verify
MCP_ENABLED=truein container environment - Check MCP servers configuration at
/app/mcp_servers.hanzo.json - Restart the chat service:
make restart
Security Note
These demo credentials are for local development only. In production:
- Use strong, unique passwords
- Disable demo credential display
- Enable proper authentication (OAuth, LDAP, etc.)
- Use environment-specific secrets