You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: updates the token create documentation (#8785)
This update removes the copied config that is in the description header.
We can remove the part about the registry not working yet when the
registry enabled this.
---------
Co-authored-by: Gar <gar+gh@danger.computer>
It can be `--read-only`, or accept a list of [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) ranges with which to limit use of this token.
32
-
This will prompt you for your password, and, if you have two-factor authentication enabled, an otp.
25
+
Please refer to the [docs website](https://docs.npmjs.com/creating-and-viewing-access-tokens) for more information on generating tokens for CI/CD.
33
26
34
-
Currently, the cli cannot generate automation tokens.
35
-
Please refer to the [docs website](https://docs.npmjs.com/creating-and-viewing-access-tokens) for more information on generating automation tokens.
27
+
#### Revoking tokens
36
28
37
-
```
38
-
Created publish token a73c9572-f1b9-8983-983d-ba3ac3cc913d
39
-
```
29
+
When revoking a token, you can use the full token (e.g. what you get back from `npm token create`, or as can be found in an `.npmrc` file), or a truncated id. If the given truncated id is not distinct enough to differentiate between multiple existing tokens, you will need to use enough of the id to allow npm to distinguish between them. Full token ids can be found on the [npm website](https://www.npmjs.com), or in the `--parseable` or `--json` output of `npm token list`. This command will NOT accept the truncated token found in the normal `npm token list` output.
40
30
41
-
*`npm token revoke <token|id>`:
42
-
Immediately removes an authentication token from the registry.
43
-
You will no longer be able to use it.
44
-
This can accept both complete tokens (such as those you get back from `npm token create`, and those found in your `.npmrc`), and ids as seen in the parseable or json output of `npm token list`.
45
-
This will NOT accept the truncated token found in the normal `npm token list` output.
31
+
A revoked token will immediately be removed from the registry and you will no longer be able to use it.
0 commit comments