Skip to content

Fix OIDC auth for trusted publishing#5

Merged
sambhav-aggarwal merged 1 commit into
mainfrom
fix/oidc-auth
May 3, 2026
Merged

Fix OIDC auth for trusted publishing#5
sambhav-aggarwal merged 1 commit into
mainfrom
fix/oidc-auth

Conversation

@sambhav-aggarwal
Copy link
Copy Markdown
Member

Removes setup-node's registry-url (which injects a placeholder auth token that breaks OIDC fallback), adds publishConfig to package.json, drops redundant --access flag. Bump 0.1.3.

actions/setup-node@v4 with registry-url writes
'//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' into .npmrc.
With NODE_AUTH_TOKEN unset (we use OIDC, not a token), npm sees a
literal placeholder as the auth header and bails with 404 — never
attempting the trusted-publishing OIDC exchange.

Removing registry-url leaves .npmrc clean so npm CLI can fall through
to the OIDC flow. Add publishConfig to package.json so the registry
and access level are recorded in the package itself, and drop --access
public from the workflow command (now redundant). Bump Node to 22.x.
@sambhav-aggarwal sambhav-aggarwal merged commit 653fcfd into main May 3, 2026
@sambhav-aggarwal sambhav-aggarwal deleted the fix/oidc-auth branch May 3, 2026 09:32
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