npm / npm/cli

[QUESTIONS and NOTES] Granular Access Tokens

Open
#8,855 4 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

  1. I can generate them in the website. Then it lets me copy them from the webpage. Am I expected to set the ~/.npmrc file manually? npm login used to set this up for me. The docs have no clear section about "Using granular access tokens". Only about creating and viewing them.
  2. According to the docs, the CLI cannot create such tokens. Is this still true as of 11.7.0? (aka I see a npm token create command)
  3. Is the "Bypass 2FA" only for tokens with write access? If so, the token creation page isn't clear about that.
  4. While write-allowed tokens have maximum of 90 days until expiration, read-only ones appear to not be limited this way (I can create tokens 1 year forward). Not super clear from the documentation and token creating page.
  5. At the end of the blog post there's a small note about current tokens (ones that npm login creates) being limited to two hours. This was not clear at all and is easy to miss. Can the CLI be clear about that when creating such tokens?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked access-token documentation and compare its guidance with the npm login and npm token create commands, including .npmrc setup and token expiration behavior. Clarify the documentation and CLI messaging for the five questions raised, with each token type and limitation explained; done means users can follow the workflow without relying on the blog post.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.