Replies: 36 comments 19 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. |
How the hell can I publish a new package via GitHub Actions without them? Both of them should only apply to published packages, shouldn't they? |
|
For anyone auditing their own repos ahead of the January 2027 change: I put the check into a CLI, because the two questions that actually matter turned out not to be "do I publish with a token" but "is the recommended fix even available in this repo". npx npm-script-lens publish --checkIt reads The parts I hadn't seen covered anywhere, and which bit me first:
TOKEN paths also print the concrete patch (add MIT, no telemetry, no account needed: https://github.com/Booyaka101/npm-script-lens â happy to add any provider or publish tool I've missed, and corrections welcome if I've read any of the requirements wrong. |
|
Following up on my comment above with a correction that matters for anyone auditing their readiness, whether or not you use my tool. If your release job delegates to a local composite action: # .github/workflows/release.yml
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: ./.github/actions/release
with:
npm-token: ${{ secrets.NPM_TOKEN }}âĶthen the Worth a manual check even with no tooling involved (note grep -rlE "npm (publish|stage publish)|pnpm publish|yarn npm publish|semantic-release" .github/Three things I learned fixing this that are useful regardless of what you audit with:
Fixed in
|
|
Agreeing with others: add support for other major CI/CD providers before forcing other (more cumbersome) methods to your users. The bitbucket pipelines rfc is open for months without any feedback. |
Hey @leobalter any updates on these use cases being discussed here? Your original post leaves me confused about whether or not we should expect enforcement soon or not |
|
I think this needs to be delayed - we should have much more extensive OIDC support before proceeding. |
|
Which mf came up with this stupid idea to remove 2FA bypass on GATs?!!!! |
|
åæĢčŋäļŠéŠčŊåūéūįĻïžäļįĨéäŧäŧŽåĒéæäđæģįïžåĪŠįģåŋäš
âĶ---Original---
From: "Gourab ***@***.***>
Date: Thu, Aug 20, 2026 12:51 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [community/community] Upcoming changes to npm 2FA-bypass granular access tokens (GATs) (Discussion #201329)
Which mf came up with this stupid idea to remove GATs?!!!!
â
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you commented.Message ID: ***@***.***>
|
|
The path to automated OIDC publishing still doesn't seem to have been laid out fully, despite these complaints being raised in September 2025: https://github.com/orgs/community/discussions/161015#discussioncomment-14451893 (and again in December 2025: https://github.com/orgs/community/discussions/179562#discussioncomment-15221604) The "Namespace-wide OIDC configuration" might mitigate this somewhat, but it sounds like you're imagining this as restricted to a scope (e.g. This will not work for users who have many unscoped packages. In fairness, I think there may have been some confusion about the definition of "namespace", given it isn't actually very well defined in the NPM world. I expected "namespace" to mean the global single namespace of npm, but could see how this was interpreted as scope. Regardless, it would be good to have a solution that works for unscoped packages! |
|
Slighly less important (than this) feedback regarding the communication of these updates:
This seems like a particularly difficult position to put people in - to give people a deadline to migrate, but no path and no committment to having any kind of path ready?
This feels a little tone deaf to post (and not helped from the post being a bit AI-slop-ish) when the same concerns seem to come up on every one of these posts, and they don't seem to get addressed in future updates. |
|
As supply chain attacks increase, I think it is increasingly important that npm discloses whether a package was published using some form of MFA, OIDC, or neither. OIDC alone will not prevent an attacker with access to Supply chain attacks could be completely halted today if packages could not be published without MFA. In nearly 100% of cases, supply chain attacks on npm are able to succeed because only one authentication factor needs to be compromised in order to publish. As a user, I should at least have access to this basic information so I can make informed decisions about what packages I want to depend on. |
MAKE CIRCLECI MONOREPO TRUSTED PUBLISHING WORK BEFORE RESTRICTING 2FA-BYPASShttps://github.com/orgs/community/discussions/191807#discussioncomment-18167274 |
|
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. |

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