Skip to content

ci: fix npm OIDC token exchange endpoint and audience#109

Merged
JumpLink merged 1 commit into
mainfrom
ci/fix-oidc-exchange-endpoint
Jun 16, 2026
Merged

ci: fix npm OIDC token exchange endpoint and audience#109
JumpLink merged 1 commit into
mainfrom
ci/fix-oidc-exchange-endpoint

Conversation

@JumpLink

Copy link
Copy Markdown
Collaborator

Problem

The OIDC token exchange was failing with HTTP 404 because:

  1. Wrong audience: 'npm' instead of 'npm:registry.npmjs.org'
  2. Wrong endpoint: /-/npm/v1/oidc/token instead of /-/npm/v1/oidc/token/exchange/package/@girs%2fgnome-shell
  3. Wrong request format: OIDC token was in the JSON body, but npm expects it as Authorization: Bearer <token> with an empty {} body

Fix

  • Audience: 'npm''npm:registry.npmjs.org'
  • Endpoint: /-/npm/v1/oidc/token/-/npm/v1/oidc/token/exchange/package/@girs%2fgnome-shell
  • OIDC token: moved from request body to Authorization: Bearer header

These fixes are derived from the reference implementation in gjsify/gjsify at packages/infra/cli/src/utils/npm-oidc.ts.

- Audience: 'npm' → 'npm:registry.npmjs.org'
- Endpoint: /-/npm/v1/oidc/token → /-/npm/v1/oidc/token/exchange/package/@Girs%2fgnome-shell
- OIDC token in request body → Authorization: Bearer header, body is {}

Matches the implementation in gjsify/packages/infra/cli/src/utils/npm-oidc.ts
@JumpLink JumpLink requested review from Totto16, schnz and swsnr as code owners June 16, 2026 19:23
@JumpLink JumpLink merged commit 231aa8a into main Jun 16, 2026
3 checks passed
@JumpLink JumpLink deleted the ci/fix-oidc-exchange-endpoint branch June 16, 2026 19:23
@Totto16

Totto16 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

@JumpLink You are using an outdated action:
image

https://github.com/gjsify/gnome-shell/actions/runs/27642358445

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.

2 participants