Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

LiangYingC
Copy link
Contributor

This is simple PR for adjust npm login and npm adduser doc.

Problem Description:

When using npm login/npm adduser, users are not aware that this command generates a legacy token with publish permissions. This information is not evident in the npm login/npm adduser cli documentation.

After a while searching. found that this context and detail hiding in the About legacy tokens documentation.

Solution:

Add a clear description in the npm login/npm adduser documentation in this PR so that users can understand publish token would be created after npm login in the future.

References

Related to this PR: npm/documentation#1550

@@ -14,6 +14,8 @@ Create a new user in the specified registry, and save the credentials to
the `.npmrc` file. If no registry is specified, the default registry
will be used (see [`registry`](/using-npm/registry)).

When you run `npm adduser`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When you run `npm adduser`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
When you run `npm adduser`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

8776742

@@ -14,6 +14,8 @@ Verify a user in the specified registry, and save the credentials to the
`.npmrc` file. If no registry is specified, the default registry will be
used (see [`config`](/using-npm/config)).

When you run `npm login`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When you run `npm login`, the CLI automatically generates a legacy token of publish type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).
When you run `npm login`, the CLI automatically generates a legacy token of `publish` type. For more information, see [About legacy tokens](/about-access-tokens#about-legacy-tokens).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

8776742

@LiangYingC LiangYingC requested a review from owlstronaut April 14, 2025 15:29
@owlstronaut owlstronaut merged commit 96cc4f9 into npm:latest Apr 14, 2025
8 checks passed
@github-actions github-actions bot mentioned this pull request Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants