-
Notifications
You must be signed in to change notification settings - Fork 6k
Add comprehensive login page customization options #7374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add CLI arguments and environment variables to customize all login page elements: - Login title, subtitle, and welcome text - Password field placeholder and submit button text - Password instruction messages (config file, env var, hashed) - Error messages (rate limit, missing/incorrect password) New CLI options: --login-title, --login-below, --password-placeholder, --submit-text --login-password-msg, --login-env-password-msg, --login-hashed-password-msg --login-rate-limit-msg, --missing-password-msg, --incorrect-password-msg New environment variables: CS_LOGIN_TITLE, CS_LOGIN_BELOW, CS_PASSWORD_PLACEHOLDER, CS_SUBMIT_TEXT CS_LOGIN_PASSWORD_MSG, CS_LOGIN_ENV_PASSWORD_MSG, CS_LOGIN_HASHED_PASSWORD_MSG CS_LOGIN_RATE_LIMIT_MSG, CS_MISSING_PASSWORD_MSG, CS_INCORRECT_PASSWORD_MSG Features: - Full backwards compatibility with existing --app-name/--welcome-text - HTML escaping for security (prevents XSS) - Config file support (YAML) - Priority: CLI args > env vars > config file > defaults - Internationalization preserved for non-customized messages Perfect for Docker deployments and corporate branding. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Thank you for the contribution! Thinking out loud, my first impression is that the flags are not scaling well. Since we have this concept of language files that we can use for strings in the app, I wonder if we can re-use this for user-provided strings as well? Maybe we have a flag that accepts a Then, all strings, including future ones, will automatically be available for configuration. What do you think? We could then also deprecate |
Sounds good. I'll work on that change. |
Replace non-scalable individual flags (--login-title, --login-below, etc.) with a unified --custom-strings flag that accepts JSON file paths or inline JSON for UI customization. This leverages the existing i18n system for better scalability and maintainability. Changes: - Add --custom-strings flag with JSON validation - Extend i18n system to merge custom strings with defaults - Remove newly-added individual login/UI flags - Deprecate legacy --app-name and --welcome-text flags - Update login route to use unified i18n system - Add comprehensive tests for new functionality - Update documentation with migration guide and examples 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Remove migration examples for flags that were never released. Only --app-name and --welcome-text were in the original codebase and might be used by existing users. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Replace outdated CS_* environment variable examples with the new --custom-strings flag approach. Include both inline JSON and mounted file examples for Docker users. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
This PR adds comprehensive customization options for the login page, allowing users to customize all text elements through CLI arguments, environment variables, or config files.
🎯 Key Features
--app-name
/--welcome-text
unchanged📋 New CLI Options
🐳 Environment Variables
All CLI options have corresponding
CS_*
environment variables:💼 Use Cases
Docker deployment with branding:
Corporate error messages:
🔧 Implementation Details
🧪 Test Plan
📚 Documentation
docs/install.md
with Docker customization examplesdocs/FAQ.md
with login customization sectiondocs/customization.md
guidedocs/README.md
with link to customization guideThis enables powerful branding and customization for enterprise deployments while maintaining full backwards compatibility.