mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
feat: add OAuth token authentication support (#236)
* feat: add OAuth token authentication support Add claude_code_oauth_token as an alternative authentication method to anthropic_api_key. This provides more flexibility for users who prefer OAuth authentication. - Add claude_code_oauth_token input to action.yml - Pass OAuth token through to claude-code-base-action - Update README with OAuth token documentation and examples - Update security best practices to cover both authentication methods - Add OAuth example to examples/claude.yml 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: add OAuth token generation instructions for Pro/Max users Update README to mention that Pro and Max users can generate OAuth tokens by running `claude setup-token` locally. This provides clearer guidance for users who want to use OAuth authentication instead of API keys. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: update CI capabilities documentation - Move GitHub Actions access from limitations to capabilities in README - Update FAQ to explain how to enable CI/CD access with actions:read permission - Clarify that Claude can access workflow results on PRs where it's tagged 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,9 @@ inputs:
|
||||
anthropic_api_key:
|
||||
description: "Anthropic API key (required for direct API, not needed for Bedrock/Vertex)"
|
||||
required: false
|
||||
claude_code_oauth_token:
|
||||
description: "Claude Code OAuth token (alternative to anthropic_api_key)"
|
||||
required: false
|
||||
github_token:
|
||||
description: "GitHub token with repo and pull request permissions (optional if using GitHub App)"
|
||||
required: false
|
||||
@@ -147,6 +150,7 @@ runs:
|
||||
use_bedrock: ${{ inputs.use_bedrock }}
|
||||
use_vertex: ${{ inputs.use_vertex }}
|
||||
anthropic_api_key: ${{ inputs.anthropic_api_key }}
|
||||
claude_code_oauth_token: ${{ inputs.claude_code_oauth_token }}
|
||||
claude_env: ${{ inputs.claude_env }}
|
||||
env:
|
||||
# Model configuration
|
||||
|
||||
Reference in New Issue
Block a user