Skip to content

Commit

Permalink
chore(docs): add npmrc docs about scoping auth related config
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Aug 25, 2022
1 parent 1e84102 commit 16ed85b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/content/configuring-npm/npmrc.md
Expand Up @@ -91,6 +91,20 @@ consistent across updates. Set fields in here using the `./configure`
script that comes with npm. This is primarily for distribution maintainers
to override default configs in a standard and consistent manner.

### Auth related configuration

The settings `_auth`, `_authToken`, `username` and `_password` must all be
scoped to a specific registry. This ensures that `npm` will never send
credentials to the wrong host.

```
; bad config
_authToken=MYTOKEN
; good config
//registry.npmjs.org/:_authToken=MYTOKEN
```

### See also

* [npm folders](/configuring-npm/folders)
Expand Down

0 comments on commit 16ed85b

Please sign in to comment.