Repository navigation
chore(ci): temporary npm OIDC audience diagnostic - #108
Merged
Merged
Conversation
'Not authenticated with npm' survives the Trusted Publisher setup, so the suspect is the token itself: #101 changed the mint URL from ?audience= to &audience=. If ACTIONS_ID_TOKEN_REQUEST_URL carries no query string, & is swallowed into the path and the JWT gets the default github.com audience — the registry then rejects it (and release-it only whitelists E401/E404 from npm whoami, so anything else surfaces as 'Not authenticated'). Step prints JWT claims only (iss/aud/sub/nbf/exp) for both URL forms, the registry /-/whoami status + body, and npm whoami exactly as release-it runs it. Never echoes the token. Remove once the fix lands.
Farenheith
requested review from
Dodt,
danielgalleni,
douglasdrdc,
fgabrielsilva and
pedrosodre
as code owners
November 19, 2026 01:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trusted Publisher is configured and it still fails, so the JWT itself is the suspect. PR #101 changed the mint URL from
?audience=to&audience=. GitHub's docs use&(their URL carries a query string); if this runner'sACTIONS_ID_TOKEN_REQUEST_URLhas none, the audience param is swallowed into the path → JWT gets the defaulthttps://github.com/…audience → npm registry refuses it. release-it'sisAuthenticated()runsnpm whoamiand only tolerates E401/E404 — other registry errors surface as exactlyNot authenticated with npm.\n\nThe added step prints, for both URL forms: the decoded JWT claims (iss/aud/sub/nbf/exponly — token never printed), the registry/-/whoamiHTTP status + body, andnpm whoamiverbatim.\n\nTo use: merge, then dispatch publish.yaml withdry_run=true. The run will still go red at lazy-structures (that's the bug under test) — paste/point me at the 'Diagnose npm OIDC audience' step and the real fix drops the guesswork.