Skip to content

JSR OIDC Publishing Fails with InvalidIssuer on Organization-Owned Repository #1485

Description

@jaypatrick

JSR OIDC Publishing Fails with InvalidIssuer on Organization-Owned Repository

Summary

Attempting to publish @bloqr/compiler-core from an organization-owned GitHub repository (BloqrAI/bloqr-core) to JSR using OIDC-based trusted publishing consistently fails with:

The provided OIDC token is invalid: InvalidIssuer (invalidOidcToken)

This occurs despite:

  • Complete JSR scope/package recreation
  • Fresh GitHub repo link in JSR package settings
  • Correct GitHub OIDC issuer (https://token.actions.githubusercontent.com)
  • No organization-level OIDC policies configured in GitHub (none exist)
  • deno publish --dry-run validation passing successfully

Environment Details

Reproduction

.github/workflows/publish-jsr.yml:

on:
  push:
    branches: ["main"]
    paths:
      - "src/adblock-compiler-core/**"
  workflow_dispatch: {}

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@v4
      - uses: denoland/setup-deno@v2
        with:
          deno-version: v2.x
      - run: deno publish --dry-run  # ✅ Passes
      - run: deno publish            # ❌ Fails with InvalidIssuer

Investigation

  1. GitHub organization settings show no OIDC policies configured (only placeholder/sample values exist)
  2. Repository is public and properly linked in JSR
  3. GitHub OIDC issuer claim matches standard format
  4. Subject claim format may have changed (July 15, 2026 GitHub OIDC update for new repos)

Current Workaround

Using JSR Workflow Token authentication instead:

- name: Publish to JSR
  env:
    JSR_TOKEN: ${{ secrets.JSR_WORKFLOW_TOKEN }}
  run: deno publish

This works reliably but loses OIDC provenance attestations.

Questions for JSR Team

  1. Does JSR support OIDC for organization-owned repositories? The docs don't clarify this limitation.
  2. Is the July 15, 2026 GitHub OIDC subject claim format change affecting validation?
  3. Are there additional OIDC policies needed at the JSR end for org-repo integration?

Desired Outcome

Clarification on:

  • Whether org-owned repos are fully supported for OIDC publishing
  • Required OIDC configuration (GitHub org-level policies, JSR settings)
  • Provenance attestation support for token-based publishing

Workaround adopted: Token-based publishing with JSR_WORKFLOW_TOKEN org secret, scoped to @bloqr namespace. Documentation added at docs/jsr-token-authentication.md.

Original GH Issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions