Skip to content

Conversation

@billfienberg
Copy link

NPM has deprecated classic tokens, so this adds support for OIDC authentication (Trusted Publishers) as an alternative to NPM_TOKEN.

  • Make NPM_TOKEN optional - only configure .npmrc when provided
  • For OIDC, npm handles auth automatically via GitHub's OIDC provider
  • Add documentation for OIDC setup in README
  • Bump version to 0.0.16

Fixes #50

NPM has deprecated classic tokens, so this adds support for OIDC
authentication (Trusted Publishers) as an alternative to NPM_TOKEN.

- Make NPM_TOKEN optional - only configure .npmrc when provided
- For OIDC, npm handles auth automatically via GitHub's OIDC provider
- Add documentation for OIDC setup in README
- Bump version to 0.0.16

Fixes #50

Co-Authored-By: Claude Opus 4.5 <[email protected]>
billfienberg added a commit to Shopify/ui-extensions that referenced this pull request Jan 8, 2026
Points to Shopify/snapit@support-oidc-authentication to test OIDC
support before merging the snapit PR.

Related: Shopify/snapit#52

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link

@kbav kbav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments/questions for now!

Create a `.github/workflows/snapit.yml` file with the following contents.

**Deploy to NPM**
**Deploy to NPM (with OIDC authentication - recommended)**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(with OIDC authentication - recommended)

I don't know that it's "recommended" so much as required

The `GITHUB_TOKEN` is needed for changesets to look up the current changeset when creating a snapshot. You can use the automatically created [`${{ secrets.GITHUB_TOKEN }}` to authenticate in the workflow job](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret).

**`NPM_TOKEN`**
**`NPM_TOKEN`** (optional)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to outright remove the deprecated NPM_TOKEN approach

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised to not see added code but that could just as well speak to my ignorance for OIDC support 😅

billfienberg added a commit to Shopify/ui-extensions that referenced this pull request Jan 8, 2026
Points to Shopify/snapit@support-oidc-authentication to test OIDC
support before merging the snapit PR.

Related: Shopify/snapit#52

Co-authored-by: Claude Opus 4.5 <[email protected]>
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.

Support OIDC authentication

2 participants