Add 2fa-required-unless-automation option for packages
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
What / Why
There are three 2FA option values: required (required), not required (not-required), and required unless automation token (required-unless-automation). libnpmaccess only recognizes the first two. I would like to be able to access the third option.
When
When I want to use a script to enable 2FA+automation token, or to ensure this option is enabled, on all packages in an organization. Currently, I have to do this manually using the npmjs.com website.
Where
- npm access
How
Currently, the option is a toggle:
npm access 2fa-required <package>npm access 2fa-not-required <package>
Expected Behavior
npm access 2fa-required-unless-automation <package>
Who
Release managers and organization administrators.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the npm access command and the libnpmaccess handling of the existing 2FA option values. Trace how 2fa-required and 2fa-not-required are parsed and sent, then verify that npm access 2fa-required-unless-automation <package> enables the third option for a package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- authentication, cli, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100