Commit cd9476e
authored
feat: enable trusted publishing for npm packages (#999)
## Summary
Switch npm publishing from token-based authentication to OIDC-based
trusted publishing.
### Changes
- Remove `npm-token` secret requirement from workflows and publish
action
- Add `id-token: write` permission for OIDC authentication
- Update npm to v11 in the publish action (required for OIDC publishing)
- Remove `--provenance` flag and `NODE_AUTH_TOKEN` environment variable
## Post-merge: Configure on npmjs.com
Package Settings → Trusted Publisher → GitHub Actions:
- **Organization**: `auth0`
- **Repository**: `auth0-react`
- **Workflow**: `release.yml`
- **Environment**: `release`
### Benefits
- Eliminates need to manage long-lived npm tokens as secrets
- Leverages GitHub's OIDC provider for secure, short-lived credentials
- Simplifies secret management across repositories using the shared
workflow1 parent a5dd7b4 commit cd9476e
File tree
3 files changed
+8
-8
lines changed- .github
- actions/npm-publish
- workflows
3 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | | - | |
| 51 | + | |
50 | 52 | | |
51 | | - | |
52 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
0 commit comments