-
Notifications
You must be signed in to change notification settings - Fork 2
AB#95879 Switch to OIDC for NPMJS Auth. #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For publishing we would have to use very short lived tokens, so we switch to OIDC which means we don't need tokens. We bump the node version to get the version of npm that supports this.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR switches from NPM token-based authentication to OpenID Connect (OIDC) for publishing packages to npmjs.com, eliminating the need for storing long-lived tokens. It also updates the Node.js version to support the required npm features.
- Removes NPM token authentication in favor of OIDC authentication
- Updates Node.js version from 22 to 24.10.0 to get npm version with OIDC support
- Adds required OIDC permissions to the GitHub workflow
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .nvmrc | Updates Node.js version to 24.10.0 for npm OIDC support |
| .github/workflows/release-tags.yml | Configures OIDC permissions and removes NPM token authentication |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| always-auth: true | ||
| - run: npm ci | ||
| - run: npm run build | ||
| - run: npm publish --access public |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The npm publish command needs to be configured to use OIDC authentication. You should add the --provenance flag to enable npm's built-in OIDC support, which will automatically use the GitHub OIDC token for authentication.
| - run: npm publish --access public | |
| - run: npm publish --access public --provenance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that https://docs.npmjs.com/trusted-publishers doesn't mention this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs say:
provenance • Default: false • Type: Boolean When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from.



For publishing we would have to use very short lived tokens, so we switch to OIDC which means we don't need tokens.
We bump the node version to get the version of npm that supports this.