Replies: 49 comments 29 replies
This comment has been hidden.
This comment has been hidden.
|
I'd love to use my 2FA app. If I could set it up... |
|
I seriously object to removing 2FA release-tokens, I do not release by using CI, the step is manual on purpose. Please keep a way to do manual releases. I do not want to release and do a button press on some website; that is completely missing the point. |
As a ARM Linux user with no hardware security keys or other straightforward ways to make passkeys this is almost a ban from NPM because authenticator apps were previously removed and this statement is an AI hallucination that misses this. I will no longer be able to publish any packages, or will have to go through a convoluted process that adds a dependency on Google or Android, if this change goes through. You could fix this by adding an alternative 2FA method, like magic links or Verified Email, or by not requiring 2FA to set up new OIDC (similarly to how 2FA isn't required to make tokens that bypass 2FA), or by just... not going through with this change. |
|
We use Bitbucket Pipelines in house and are waiting for Atlassian and NPM to support trusted publishing from bitbucket cloud. See the following: npm/rfcs#846 and https://jira.atlassian.com/browse/BCLOUD-23917 |
|
This appears to leave GHES w/ self-hosted GHAR without a viable migration path for automated publishing. We are currently publishing daily preview builds to npm from GHES self-hosted runners using a 2FA-bypass granular token. It sounds like that flow will stop working in January 2027 without an alternative. Trusted Publishing would be the right replacement and we would be more than happy to move to it, but the docs still say self-hosted runners are unsupported and only “planned for future releases.” This was raised multiple times (for example see here or here) during the previous token restriction discussions, and support for more providers/runners was described as planned. Can you clarify whether direct trusted publishing from GHES self-hosted runners will be supported before the January 2027 enforcement date? If not, will enforcement be delayed or will there be another non-interactive migration path? With stage-only publishing we won't be able to use npmjs for our daily preview builds. |
|
We rely on non-interactive tokens to automate management of organization membership and package access. Once bypass-2FA tokens lose that ability in Phase 1, we lose the ability to run either of these without a human manually completing the action every time. This discussion covers the forthcoming solutions for publishing and package management but provides no reasonable solutions for organization management which is arriving in a much shorter timescale. Is there (or will there be) a non-interactive, narrowly-scoped mechanism for managing org/team membership analogous to trusted publishing for packages e.g. something OIDC-based Are SAML/SCIM integrations for user management on the roadmap? If so, would SCIM-driven provisioning/de-provisioning be the intended long-term replacement for bypass-2FA tokens in this use case, and is there a rough timeline? |
|
Before pushing this I would suggest to really take a look at the current way of configuring OIDC. Currently you can only configure it after a package was published at least once. This is terrible when you only publish through a pipeline. Basically you have to configure the pipeline first for a 1 time run with a token that can only prepublish and a prepublish step. Once you have that you can change the whole pipeline since only then the configuration appears. Much better would be to at least offer OIDC config on a scope/organisation (this is difficult for non-scoped packages). So you can configure up front which identity provider and rules you trust. Also having read statements above. When configuring OIDC, extend the matching config so people can basically configure any source. |
We also have an operational need for this. We use time-limited team grants to let an engineer (e.g. on-call) join a scoped npm team just long enough to approve a staged publish, then auto-remove them when the grant expires. That's what lets us maintain least privilege — without a non-interactive path we'd have to either keep many engineers permanently in privileged npm teams (or otherwise deal with team management toil in some way) or store a shared admin credential in a vault. A non-interactive, OIDC-scoped mechanism for org/team membership would directly cover this. |
This is the main pain point right now for us right now. Any tentative timeline? |
|
Please ensure trusted publishing supports |
This comment was marked as low quality.
This comment was marked as low quality.
|
How do I enable 2FA? npm thinks I do not have 2FA and prompts me to register. But when I try to log in, it E-Mails me an OTP; sounds like I have 2FA? If I try and go into "enable 2FA" , it says something about "Security key" - huh? What's the point of this? Forcing into a closed ecosystem? What the heck is Microsoft trying to do? Open source platform innit? Let me use my TOTP then. No npm for me till it is fixed, "removing 2FA bypass" is a stupid title, when you don't actually have real 2FA, just a proprietary system to lock people into walled gardens. Disgusting. |
|
Bring back the ability to set up TOTP. "Passkeys" are crap. |
|
npmjs, before being so aggressive with the hardware 2FA rollout, please start supporting the keys that your users have. I have a SoloKey 2. I use it with other sites without an issue. But with npmjs, it lets me register the key but then refuses to let me authenticate with it. Each time I try (across three devices), I get "Something went wrong." I had to use my recovery codes to log in. The combination of having poor support for something you're trying to mandate is a bad look. |
|
Used trusted publishing, worked great. 10/10, much simpler/safer than tokens. Organization migrated to GitHub Enterprise Cloud w/ data residency (GHEC, [org].ghe.com hosted). Trusted publishing no longer an option due to NPM's lack of optionality. Wasted time becoming less secure moving to granular tokens and waste time once a quarter creating new ones. Now NPM is going to break everything again while still not supporting trusted publishing for enterprise GitHub users. How can you mandate changes to "improve security" when it's impossible to actually implement them for so many users/orgs? Appalling user experience NPM. Absurd if this goes through as planned without trusted publishing support for something as common for large orgs as GHEC by mid-October at the latest. |
|
Since npm / github / micro$oft don't want to do anything about it, I decided to take matters into my own hands. Registering a throwaway github + npm account as a PoC , I have a script that uses So now my package can be published with "passkeys" from a remote machine without human intervention, or OIDC from a few proprietary providers. This means that you could do this on any machine which the shim could run on, which stubs the passkey functions in Chromium w/ keys you provide. As a bonus, the credentialId to register can be any 32 bytes you want, so you can have some fun with it:
Here's the repo if anyone wants to play around: https://github.com/nmpwaifu/gettodaysdate |
|
I agree applying 2FA to publish packages, but not agree to the PASSKEY. |
|
Embrace ✅
You didn't resolve or address a single, solitary issue raised in the comments. |
|
This post makes no mention of managing dist-tags with 2FA bypass GAT. It may have unclearly been bundled in "package management". This completely breaks our CI flow for publishing PRs as a tag and then removing that tag when it is no longer needed so it isn't prominently displayed in the registry. There has been no provided way to do this without a 2FA token, which defeats the purpose of this being in CI (so that any org member can do it). This needs to be added to trusted publishing at least, ASAP. Breaking completely reasonable workflows without a replacement is the type of thing that makes developers look for other platforms. |
|
We use Bitbucket Pipelines in house and are waiting for Atlassian and NPM to support trusted publishing from bitbucket cloud. Please take this into consideration. |
|
These changes make npm publishing much safer. I especially appreciate the staged publishing and batch approval approach, which should make secure publishing easier for larger and monorepo projects. |
|
This is a blocker for me being able to publish on npm. I do not own a biometric device that can be used for 2 factor authentication and my workflow requires publishing from the command line. |
|
This "discussion" has been up for almost 3 months and not a single time has the NPM team here constructively responded to any of the serious concerns raised here. So I will reiterate my strong objection to these proposals once more: These changes, however well intended, are plainly exclusionary practices and bad for what's left of open source culture!
These combined effects mean people publishing multiple/many packages in one release cycle (e.g. from a monorepo) won't be able to publish to NPM anymore and will have to find alternative hosting, which will incur further effort on the maintainer side & much reduced visibility/findability of our opensource work. Thank you very much NPM team! Not! At the very least we're all deserving some actual feedback to these issues, not just an announcement that this is how it's gonna be from January and then absolute silence for months or snarky one-liner replies when people are trying share workarounds for this fiasco and some of the largest changes ever proposed to the NPM ecosystem! |
|
The same npm PM who opened this discussion started a new one which provides a response to some of the feedback we've given here: npm’s roadmap: safer publishing, smoother workflows, and what’s next. |
|
Quick reminder, #201329 (reply in thread) . This, as written, will not make NPM safer--it will encourage fake passkeys and communal global key breaches by dusgruntled users, and potentially lead to packages becoming malicious specifically to obtain OIDC global keys or hook passkey-manipulation functions ahead of the deadline solely to ensure they can still publish their legitimate functionality |
|
gat-s are already annoying to use because of the requirement to rotate them every 90 days. but whatever, its not that much work, just annoying. so instead of just clicking one "Run release" button in my CI, i need to then wait for 10-15 minutes for the packages to publish and then manually approve them from "staged packages". and the only solution you are suggesting is.. trusted publishing? at least make it work first, you can't even set it up for not-yet-created packages, let alone use it with non-github CIs (yes, they exist!). and again, imaging setting it up for 20 monorepo packages separately, lol. at least add org-wide trusted publishing settings this all feels like just a vendor lock in under the security sauce, this brings nothing in terms of security, people will just continue using those GAT-s, but with "bypass 2fa" disabled, and compute the 2FA secret right in the CI. like this genuinely makes me want to stop publishing to npm whatsoever and move to jsr. because at least their tokens are long-lived, and they actually listen to the community. |
|
Ok, so the change was expected in Jan 2027 but now I'm confronted with this: So doing that: Then proceed with the release ceremony: But I cannot find any OTP like password. Nice, you are preventing me from publishing, roughly 3 months before the deadline. I mean, the total disrespect was visible, but rolling out limitations before the deadline is beyond disrespectful. And it gets worse, even with a GAT that does NOT bypass 2FA you are still greated with this error: |
|
The migration / expected happy-path is non-functional as of today, due to npm/cli#9969 |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Alongside the npm v12 release, we're beginning to phase out the most sensitive uses of npm granular access tokens (GATs) that are configured to bypass 2FA. This post explains what's changing, when, and how to migrate. Ask questions in the comments — we'll keep this thread updated as migration guides land.
Why we're doing this
A leaked 2FA-bypass token today can be used to take over an account — change the email, generate recovery codes, mint new tokens, add a maintainer — and publish malicious versions, all with no human present. These tokens are the single largest credential-based attack surface on the registry. A 2FA-bypass token shouldn't be a way to skip 2FA for managing your account or publishing.
Change 1 — 2FA-bypass tokens can no longer perform account/org/package management (early August 2026)
Once this rolls out, a 2FA-bypass token will not be able to perform sensitive management actions. These will require an interactive 2FA challenge instead. Affected operations include:
How to prepare: Stop using 2FA-bypass tokens for these operations. Perform them interactively (web or CLI) with a 2FA challenge.
Change 2 — 2FA-bypass tokens can no longer publish directly (targeting January 2027)
After Change 1, 2FA-bypass tokens will also lose direct publish. Their publishing surface is reduced to reading private packages and staging a publish — a staged package only becomes public after a human 2FA approval.
How to prepare: Move automated publishing to one of:
What's coming to make migration easier
We know some of today's workflows don't yet have a clean path off these tokens. Over the coming months we're shipping a series of improvements aimed squarely at closing those gaps. A preview of what's on the roadmap:
@scope/*namespace, including a dynamic option and support for creating brand-new scoped packages directly from a trusted workflow.…and more. We'll announce each of these as it ships and post migration guides here. We don't have firm dates for these yet, so please don't build your migration timeline around them — the enforcement dates above are what to plan against.
A note on recovery codes
Recovery codes are a last-resort account-recovery mechanism, not a routine second factor. If you're using recovery codes as your day-to-day 2FA — including for publishing — please switch to a standard 2FA method (an authenticator app or a hardware security key) now. Routinely using recovery codes weakens your account's protection, and recovery-code use can already place high-impact accounts into a temporary read-only state (preventive account protection).
Help us find the gaps
Our goal is to fully retire direct publishing and account management via 2FA-bypass tokens. Before we tighten these restrictions, we want to make sure every legitimate workflow has a viable path forward.
If your current setup depends on a 2FA-bypass token, tell us what would block you from migrating to trusted publishing or staged publishing. We're especially interested in cases that might not yet be covered by the changes above. e.g.: a publishing pattern (mono-repo, release orchestration, tooling integration) that becomes impractical without a token
We're using this feedback to close the remaining gaps before enforcement, so anything you flag now shapes what we build.
All reactions