You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename OIDC fields for Claude: separate OAuth and API token env vars
- Renamed OIDCConfig.EnvVarName -> OauthTokenEnvVar (for OIDC OAuth token)
- Renamed OIDCConfig.FallbackEnvVar -> ApiTokenEnvVar (for API key fallback)
- Added GetOAuthTokenEnvVarName() to CodingAgentEngine interface
- Claude now uses CLAUDE_CODE_OAUTH_TOKEN for OIDC tokens
- Claude uses ANTHROPIC_API_KEY as API key fallback
- Updated setup_oidc_token.cjs to distinguish OAuth vs API tokens
- Updated schema and tests to reflect new field names
- OAuth token from OIDC is exported to CLAUDE_CODE_OAUTH_TOKEN
- API key fallback remains as ANTHROPIC_API_KEY
Co-authored-by: pelikhan <[email protected]>
Copy file name to clipboardExpand all lines: pkg/parser/schemas/main_workflow_schema.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2991,13 +2991,13 @@
2991
2991
"type": "string",
2992
2992
"description": "URL endpoint to revoke the app token after workflow execution (optional)"
2993
2993
},
2994
-
"env_var_name": {
2994
+
"oauth_token_env_var": {
2995
2995
"type": "string",
2996
-
"description": "Environment variable name to store the token. Defaults to engine-specific variable (e.g., ANTHROPIC_API_KEY for Claude)"
2996
+
"description": "Environment variable name for OAuth token obtained via OIDC. For Claude: CLAUDE_CODE_OAUTH_TOKEN. Defaults to engine-specific variable."
2997
2997
},
2998
-
"fallback_env_var": {
2998
+
"api_token_env_var": {
2999
2999
"type": "string",
3000
-
"description": "Fallback environment variable to use if OIDC token acquisition fails. Typically references a secret (e.g., ${{ secrets.ANTHROPIC_API_KEY }})"
3000
+
"description": "Environment variable name for API key used as fallback. For Claude: ANTHROPIC_API_KEY. Defaults to engine-specific variable."
// Set the token in the environment for subsequent steps
147
-
core.info(`Setting token in environment variable: ${envVarName}`);
148
-
core.setOutput("token",appToken);
149
-
core.setOutput("token_source","oidc");
150
-
core.exportVariable(envVarName,appToken);
146
+
// Set the OAuth token in the environment for subsequent steps
147
+
core.info(`Setting OAuth token in environment variable: ${oauthTokenEnvVar}`);
148
+
core.setOutput("token",oauthToken);
149
+
core.setOutput("token_source","oauth");
150
+
core.exportVariable(oauthTokenEnvVar,oauthToken);
151
151
152
152
// Also output the token for post-step revocation
153
153
core.setOutput("oidc_token_obtained","true");
154
154
}catch(error){
155
155
// Only set failed if we get here - workflow validation errors will return before this
156
156
core.setFailed(
157
-
`Failed to setup token: ${errorinstanceofError ? error.message : String(error)}\n\nIf you instead wish to use a custom token, provide it via the fallback environment variable.`
157
+
`Failed to setup token: ${errorinstanceofError ? error.message : String(error)}\n\nIf you instead wish to use an API token, provide it via the ${apiTokenEnvVar} secret.`
0 commit comments