[BUG] NPM Granular Access Token are unable to Bypass two-factor authentication (2FA)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Currently, I am unable to check the box to disable 2FA on npm tokens. This is causing disruption to our package pipeline process as this option is supposed to be configurable. Is there something I am performing incorrectly?
Expected Behavior
I should be able to configure the token via checkbox to enable/disable 2FA auth for a given granular access token
Steps To Reproduce
- create a token under your organization.
- navigate to Access Tokens
- create a granular access token
- visit granular access token
- try to check Bypass two-factor Authentication (2FA). Nothing occurs.
Programmatically checking the box doesn't have an effect. Orgs with read/write have bypass for 2fa enabled with granular access token
same organization
Environment
- npm: 10.9.3
- Node.js: v22.19.0
- OS Name: Linux x86_64 GNU/Linux
- System Model Name:
- npm config:
loglevel = "warn"
; node bin location = /usr/local/bin/node
; node version = v22.19.0
; npm local prefix = /root
; npm version = 10.9.3
; cwd = /root
; HOME = /root
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 by reproducing the organization granular access-token flow described in the issue with npm 10.9.3, then determine whether the checkbox behavior belongs in npm CLI or the npm web and organization settings. Done means the Bypass two-factor Authentication (2FA) option can be enabled or disabled for the token and the resulting token behavior matches that setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication, cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100