Skip to content

Improve authentication setup documentation and error messages#762

Merged
afadil merged 1 commit intomainfrom
claude/analyze-issue-588-ZquBu
Mar 19, 2026
Merged

Improve authentication setup documentation and error messages#762
afadil merged 1 commit intomainfrom
claude/analyze-issue-588-ZquBu

Conversation

@afadil
Copy link
Owner

@afadil afadil commented Mar 19, 2026

Description

This PR enhances the authentication setup experience by providing clearer documentation and more helpful error messages for users configuring password-based authentication.

Changes

Documentation improvements:

  • Added a comprehensive "Dollar-sign escaping cheat-sheet" in README.md with examples for .env files, Docker Compose YAML, and docker run commands
  • Expanded compose.yml comments with detailed authentication setup instructions, including password hash generation command and escaping guidance
  • Clarified the purpose of WF_AUTH_REQUIRED configuration option

Error message improvements:

  • Enhanced the startup panic message in config.rs when authentication is required but not configured, breaking it into numbered steps with specific instructions
  • Added detailed error handling in auth.rs when WF_AUTH_PASSWORD_HASH fails to parse, explaining the expected format and escaping requirements for different contexts

Motivation

Users frequently struggle with:

  1. Understanding how to generate Argon2id password hashes
  2. Properly escaping $ characters in different configuration contexts (.env, YAML, shell)
  3. Knowing what to do when authentication setup fails

These changes provide clear, actionable guidance at the point of configuration and failure, reducing setup friction.

Checklist

By submitting this PR, I agree to the CLA.

https://claude.ai/code/session_01AKRG2muLKf4dFxgjs3qE4M

The fail-closed panic when WF_AUTH_PASSWORD_HASH is unset on non-loopback
addresses was confusing Docker users — the compose.yml comments said the
hash was only "recommended" and didn't mention WF_AUTH_REQUIRED.

- compose.yml: clarify that auth is required on 0.0.0.0, document
  dollar-sign escaping, surface WF_AUTH_REQUIRED option
- config.rs: expand panic message with actionable fix steps
- auth.rs: improve AuthManager::new error to hint at $ escaping
- README.md: add dollar-sign escaping cheat-sheet table

https://claude.ai/code/session_01AKRG2muLKf4dFxgjs3qE4M
@afadil afadil merged commit 50ad095 into main Mar 19, 2026
0 of 2 checks passed
@afadil afadil deleted the claude/analyze-issue-588-ZquBu branch March 19, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants