Skip to content

Conversation

@crisap94
Copy link
Member

@crisap94 crisap94 commented Jan 7, 2026

Summary

This PR fixes npm OIDC trusted publishing authentication by removing the NODE_AUTH_TOKEN environment variable from the publish step.

Changes

  • βœ… Remove NODE_AUTH_TOKEN env block from deploy.yml
  • βœ… Bump version to 0.2.10 for deployment test

Root Cause

Research revealed that setting NODE_AUTH_TOKEN to any value (even an empty string '') prevents OIDC authentication from working. The variable must be completely absent for npm to use OIDC trusted publishing.

Why This Should Work Now

  1. Previous attempts had NODE_AUTH_TOKEN: '' which actively blocked OIDC
  2. npm Trusted Publisher is correctly configured (verified via screenshot)
  3. Provenance signing already works - proves OIDC token generation is functional
  4. Clean slate - no conflicting authentication methods

Configuration Verified

  • βœ… id-token: write permission set
  • βœ… environment: npm-production matches npm config
  • βœ… Repository is public
  • βœ… registry-url configured in setup-node
  • βœ… npm Trusted Publisher configured: ubidots/react-html-canvas/deploy.yml/npm-production

Testing

Once merged, the workflow will automatically:

  1. Trigger on package.json change
  2. Run quality checks
  3. Build the library
  4. Publish to npm using pure OIDC authentication
  5. Create GitHub release v0.2.10

References


Note: If this fails again, we'll fall back to traditional npm token authentication.

- Remove NODE_AUTH_TOKEN env block to enable pure OIDC authentication
- Bump version to 0.2.10 for deployment test
- Empty NODE_AUTH_TOKEN was preventing OIDC from working

Key insight from research: NODE_AUTH_TOKEN must be completely absent
(not even empty string) for npm trusted publishing to work via OIDC.
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Warning

Rate limit exceeded

@crisap94 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 2 seconds before requesting another review.

βŒ› How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a7f532e and d2524e6.

πŸ“’ Files selected for processing (2)
  • .github/workflows/deploy.yml
  • package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

πŸ” PR Quality Check Summary

Check Status
Code Quality & Tests βœ… success
Security Audit βœ… success

πŸ“‹ Checks Performed:

  • βœ… TypeScript compilation
  • βœ… ESLint code quality
  • βœ… Prettier code formatting
  • βœ… Unit tests with coverage (80%+ required)
  • βœ… Build verification
  • βœ… Security audit

πŸŽ‰ All checks passed! This PR is ready for review.

@crisap94 crisap94 merged commit 4025f5e into main Jan 7, 2026
4 checks passed
crisap94 added a commit that referenced this pull request Jan 7, 2026
After 4 failed attempts with OIDC trusted publishing (#20, #21, #22, #23),
we're switching to the more reliable traditional npm token authentication.

Changes:
- Add registry-url back to setup-node
- Add NODE_AUTH_TOKEN env using NPM_TOKEN secret
- Bump version to 0.2.12
- Keep --provenance flag for supply chain security

Required setup:
1. Create npm automation token at https://www.npmjs.com/settings/[username]/tokens/create
2. Add as GitHub secret: NPM_TOKEN

Benefits:
βœ… Battle-tested and reliable
βœ… Still supports provenance attestation
βœ… No OIDC configuration issues

Trade-offs:
⚠️ Requires manual token management
⚠️ Token needs rotation
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