Skip to content

feat: add auth_token config for self-hosted crit-web#208

Merged
tomasz-tomczyk merged 3 commits intomainfrom
feat/auth-token
Mar 27, 2026
Merged

feat: add auth_token config for self-hosted crit-web#208
tomasz-tomczyk merged 3 commits intomainfrom
feat/auth-token

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Adds auth_token field to Config (JSON key: auth_token, also reads CRIT_AUTH_TOKEN env var)
  • All outbound HTTP requests to crit-web now include Authorization: Bearer <token> when a token is configured
  • No-op when token is empty — crit.md users are unaffected

Usage

Set in ~/.crit.config.json:

{ "auth_token": "crit_..." }

Or via environment:

export CRIT_AUTH_TOKEN=crit_...

Generate a token from the self-hosted dashboard.

Test plan

  • Existing tests pass (go test ./...)
  • Share to a self-hosted instance with auth required — verify token is sent
  • Share to crit.md (no token configured) — verify unaffected

🤖 Generated with Claude Code

tomasz-tomczyk and others added 3 commits March 27, 2026 16:30
Add auth_token field to Config (json: auth_token), resolved via
CRIT_AUTH_TOKEN env var or config file. When set, all outbound HTTP
requests to crit-web include Authorization: Bearer <token>.

No-op when empty, so crit.md users are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 55460e9 into main Mar 27, 2026
2 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the feat/auth-token branch March 27, 2026 17:02
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.

1 participant