Skip to content

Commit c9df896

Browse files
committed
[docs] Add 2FA requirements for publishing scoped public packages
1 parent 80b0e3e commit c9df896

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-scoped-public-packages.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ npm install /path/to/my-test-package
7777

7878
By default, scoped packages are published with private visibility. To publish a scoped package with public visibility, use `npm publish --access public`.
7979

80+
<Note>
81+
82+
**Important:** Before you can publish, you must have either:
83+
- [Two-factor authentication (2FA)][config-2fa] enabled on your account, OR
84+
- A [granular access token with bypass 2FA enabled][creating-token] (required for CI/CD workflows)
85+
86+
For more information, see "[Requiring 2FA for package publishing][requiring-2fa]."
87+
88+
</Note>
89+
8090
1. On the command line, navigate to the root directory of your package.
8191

8292
```
@@ -111,3 +121,6 @@ For more information on the `publish` command, see the [CLI documentation][cli-p
111121
[cli-publish]: /cli/publish
112122
[pii]: https://en.wikipedia.org/wiki/Personally_identifiable_information
113123
[provenance-how-to]: /generating-provenance-statements
124+
[config-2fa]: /configuring-two-factor-authentication
125+
[creating-token]: /creating-and-viewing-access-tokens
126+
[requiring-2fa]: /requiring-2fa-for-package-publishing-and-settings-modification

0 commit comments

Comments
 (0)