Skip to content

Fix OIDC auth for npm Trusted Publishers#17

Merged
sdserranog merged 2 commits intomainfrom
sdserranog/fix-npm-trusted-pub
Mar 5, 2026
Merged

Fix OIDC auth for npm Trusted Publishers#17
sdserranog merged 2 commits intomainfrom
sdserranog/fix-npm-trusted-pub

Conversation

@sdserranog
Copy link
Copy Markdown
Contributor

Summary

  • Restores registry-url in actions/setup-node (needed for registry config)
  • Strips the _authToken placeholder from .npmrc after setup so npm uses OIDC exchange instead of the empty token
  • Bumps to 0.2.3 to trigger release on merge

Context

  • Without registry-url: npm gets ENEEDAUTH (no auth at all)
  • With registry-url + ${NODE_AUTH_TOKEN} placeholder: npm sends empty token, gets E404
  • With registry-url + _authToken deleted: npm should fall through to OIDC-based Trusted Publisher auth

Test plan

  • Release workflow succeeds on merge
  • npm view @arcadeai/create-agent version returns 0.2.3

🤖 Generated with Claude Code

actions/setup-node with registry-url creates .npmrc with
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}. This empty
placeholder prevents npm from using the OIDC exchange for Trusted
Publishers. Deleting the _authToken config after setup lets npm
fall through to OIDC-based authentication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sdserranog sdserranog force-pushed the sdserranog/fix-npm-trusted-pub branch from bdfdbf9 to 6afbc37 Compare March 5, 2026 00:29
Node 22 ships with npm v10.x which does not support OIDC-based
trusted publishing. OIDC support was added in npm v11.5.1.
Adding `npm install -g npm@latest` before publish ensures the
OIDC token exchange with npm works correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sdserranog sdserranog merged commit b217c82 into main Mar 5, 2026
@sdserranog sdserranog deleted the sdserranog/fix-npm-trusted-pub branch March 5, 2026 00:33
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