Skip to content

Commit 6b84429

Browse files
committed
[docs] Update 2FA requirements for package publishing in user account setup
1 parent b8cca30 commit 6b84429

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

content/getting-started/setting-up-your-npm-user-account/about-two-factor-authentication.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ When you enable 2FA, you will be prompted for a second form of authentication be
2020

2121
</Note>
2222

23+
<Note variant="warning">
24+
25+
**Important:** Publishing packages to npm now requires either:
26+
- Two-factor authentication (2FA) enabled on your account, OR
27+
- A [granular access token with bypass 2FA enabled][granular-tokens] (for CI/CD workflows)
28+
29+
For more information, see "[Requiring 2FA for package publishing][pkg-2fa]."
30+
31+
</Note>
32+
2333
## Two-factor authentication on npm
2434

2535
Two-factor authentication on npm can be enabled for authorization and writes, or authorization only.
@@ -63,6 +73,7 @@ If you enable 2FA for authorization only. We will request a second form of authe
6373
[token-create]: https://docs.npmjs.com/cli/token
6474
[token-revoke]: https://docs.npmjs.com/cli/token
6575
[publish]: https://docs.npmjs.com/cli/publish
76+
[granular-tokens]: /creating-and-viewing-access-tokens
6677
[unpublish]: https://docs.npmjs.com/cli/unpublish
6778
[deprecate]: https://docs.npmjs.com/cli/deprecate
6879
[access]: https://docs.npmjs.com/cli/access

content/getting-started/setting-up-your-npm-user-account/configuring-two-factor-authentication.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ import shared from '~/shared.js'
66

77
You can enable two-factor authentication (2FA) on your npm user account to protect against unauthorized access to your account and packages using a [security-key][webauthn].
88

9+
<Note variant="warning">
10+
11+
**Important:** Publishing packages to npm now requires either:
12+
- Two-factor authentication (2FA) enabled on your account, OR
13+
- A [granular access token with bypass 2FA enabled][creating-token] (for CI/CD workflows)
14+
15+
If you plan to publish packages, you must enable 2FA or use a bypass 2FA token.
16+
17+
</Note>
18+
919
## Prerequisites
1020

1121
Before you enable 2FA on your npm user account, you must:
@@ -193,6 +203,7 @@ The Twitter or GitHub account is now linked to your npm account. To remove the l
193203
[can-i-use]: https://caniuse.com/#search=webauthn
194204
[viewing-and-regenerating-recovery-code]: /recovering-your-2fa-enabled-account#viewing-and-regenerating-recovery-code
195205
[webauthn]: https://webauthn.guide/
206+
[creating-token]: /creating-and-viewing-access-tokens
196207
[u2f]: https://en.wikipedia.org/wiki/Universal_2nd_Factor
197208
[windows-hello]: https://support.microsoft.com/en-us/windows/learn-about-windows-hello-and-set-it-up-dae28983-8242-bb2a-d3d1-87c9d265a5f0
198209
[touch-id]: https://support.apple.com/en-gb/HT204587

0 commit comments

Comments
 (0)