π§ [PB-1278] Fix OIDC authentication - remove registry-url conflict #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes OIDC authentication by removing
registry-urlfrom setup-node to avoidNODE_AUTH_TOKENconflict.Problem
Previous attempts failed because:
pnpm publishβ pnpm doesn't support OIDC βregistry-urlβ setup-node setsNODE_AUTH_TOKENwhich conflicts with OIDC βRoot Cause
When
registry-urlis configured in setup-node:.npmrcautomaticallyNODE_AUTH_TOKENenvironment variableSolution - Option 1 (Simple)
Don't use
registry-url- npm CLI detects OIDC automatically:How It Works
id-token: writepermission)Changes Made
File:
.github/workflows/deploy.ymlregistry-urlfrom setup-node (avoids NODE_AUTH_TOKEN conflict)npm publishinstead ofpnpm publish(OIDC support)--provenanceflag (cryptographic attestation)Configuration Summary
id-token: writepermissionenvironment: npm-production(matches npm Trusted Publisher)npm publish --provenanceregistry-url(to avoid NODE_AUTH_TOKEN)Why This Approach
According to npm community discussions and testing:
NODE_AUTH_TOKENmanuallyWe chose Option 1 for simplicity and fewer potential conflicts.
Verification
npm Trusted Publisher configuration verified:
ubidotsβreact-html-canvasβdeploy.ymlβnpm-productionβReferences