Skip to content

feat: add CLAUDE_CODE_OAUTH_TOKEN support for subscription auth#50

Open
safrano9999 wants to merge 1 commit into
RichardAtCT:mainfrom
safrano9999:feat/oauth-token-support
Open

feat: add CLAUDE_CODE_OAUTH_TOKEN support for subscription auth#50
safrano9999 wants to merge 1 commit into
RichardAtCT:mainfrom
safrano9999:feat/oauth-token-support

Conversation

@safrano9999
Copy link
Copy Markdown

Summary

  • Passes CLAUDE_CODE_OAUTH_TOKEN env var through docker-compose.yml so subscription users can authenticate without an API key
  • Documents the new variable in .env.example with usage instructions
  • Enables users who authenticate via claude auth (CLI login) to use the wrapper in Docker/Podman

Test plan

  • Set CLAUDE_CODE_OAUTH_TOKEN in .env and verify wrapper authenticates successfully
  • Verify wrapper still works with ANTHROPIC_API_KEY (no regression)
  • Verify container starts without either token set (graceful fallback)

🤖 Generated with Claude Code

Allows users with Claude Code subscriptions to authenticate via their
OAuth token instead of requiring an API key. Token is passed through
docker-compose from .env and documented in .env.example.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@safrano9999
Copy link
Copy Markdown
Author

Feature idea: OAuth token rotation on rate limit

Building on this PR's CLAUDE_CODE_OAUTH_TOKEN support — it would be useful to support multiple tokens with automatic rotation when hitting rate limits.

Concept:

  • Support numbered env vars: CLAUDE_CODE_OAUTH_TOKEN_1, CLAUDE_CODE_OAUTH_TOKEN_2, ..., CLAUDE_CODE_OAUTH_TOKEN_N
  • On a rate limit error (429), automatically rotate to the next token
  • When reaching the last token, wrap around to _1 (round-robin)
  • Fall back to current single CLAUDE_CODE_OAUTH_TOKEN behavior when no numbered vars are set

This would allow users with multiple Claude subscriptions to pool their rate limits without needing multiple wrapper instances or external load balancing.

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