Skip to content

fix: respect CLAUDE_CODE_OAUTH_TOKEN env authentication check in standalone mode#774

Open
iamriajul wants to merge 3 commits intocoder:mainfrom
iamriajul:patch-2
Open

fix: respect CLAUDE_CODE_OAUTH_TOKEN env authentication check in standalone mode#774
iamriajul wants to merge 3 commits intocoder:mainfrom
iamriajul:patch-2

Conversation

@iamriajul
Copy link
Contributor

Description

Update the authentication guard to support multiple authentication paths.
Previously, authentication setup was skipped unless CLAUDE_API_KEY was present. This change allows the setup to proceed when either CLAUDE_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, or ARG_ENABLE_AIBRIDGE=true is provided.

This ensures OAuth-based flows and AIBridge-enabled environments work correctly without requiring an API key.


Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Testing & Validation

  • Tests pass (bun test) (not applicable — shell logic change)
  • Code formatted (bun fmt) (not applicable)
  • Changes tested locally

Tested scenarios:

  • ✅ API key present → auth setup runs
  • ✅ OAuth token present → auth setup runs
  • ✅ AIBridge enabled without keys → auth setup runs
  • ✅ No auth inputs → setup correctly skipped

Related Issues

None

…andalone mode

Update guard condition to skip authentication only when:
- CLAUDE_API_KEY is unset
- CLAUDE_CODE_OAUTH_TOKEN is unset
- ARG_ENABLE_AIBRIDGE is false

This enables authentication flow for OAuth-based usage and AIBridge scenarios.
@iamriajul iamriajul marked this pull request as ready for review March 1, 2026 06: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