Why is npm getting rid of TOTP as 2FA authentication method? #178148
Replies: 11 comments 10 replies
-
|
Hi @prahladyeri , The main reason npm is phasing out TOTP is security. FIDO/WebAuthn (like hardware keys or passkeys) are phishing-resistant the private key never leaves your device and authentication is bound to the site’s domain, so it can’t be reused elsewhere. That said, many developers share your concern about accessibility especially those on Linux or open-source browsers. |
Beta Was this translation helpful? Give feedback.
-
|
FYI: There is a community thread for this topic here: https://github.com/orgs/community/discussions/174505 (consider upvoting) GitHub recently posted an update on their plans here: https://github.com/orgs/community/discussions/178140 |
Beta Was this translation helpful? Give feedback.
-
|
That the only 2FA method npm provides to users now are hardware keys is a HUGE security issue and achieves the opposite of the intended effect. Way fewer people are willing to use that... |
Beta Was this translation helpful? Give feedback.
-
|
That the only 2FA method npm provides to users now are hardware keys is a HUGE security issue and achieves the opposite of the intended effect. Way fewer people are willing to use that... |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the question! npm is moving away from TOTP primarily due to security concerns and not because of any preference toward proprietary or “closed” systems. TOTP codes can be phished or intercepted, especially during targeted supply-chain attacks. Attackers can trick users into entering their one-time codes on fake sites, or capture them in real time and immediately reuse them. For a large package ecosystem like npm, this risk is significant because account compromise can lead to widespread malicious package publication. FIDO/WebAuthn-based 2FA provides strong protection against these attacks. These methods are phishing-resistant, since authentication is bound to the legitimate domain and the private key never leaves the user’s device. This is why many ecosystems (npm, GitHub, Google, GitLab, etc.) are standardizing around them. Regarding accessibility: To summarize: Why phase out TOTP? It’s still better than nothing, but it’s vulnerable to phishing and real-time interception. Why WebAuthn/FIDO? They are phishing-resistant, more secure for a large software registry, and now broadly supported across platforms. Accessibility? The shift isn’t intended to exclude users; compatibility on Linux and open-source browsers is supported and continually improving. Hope this helps clarify the reasoning behind the transition! |
Beta Was this translation helpful? Give feedback.
-
Where in the world are you getting this from? NPM is a project run and maintained by Microsoft, famous anti-FOSS company, not sure why you'd believe otherwise. |
Beta Was this translation helpful? Give feedback.
-
|
push |
Beta Was this translation helpful? Give feedback.
-
|
Can't believe I just got locked out of my NPM 2FA after disabling my current TOTP (bc I am setting up a diffferent, LOCAL, SECURE TOTP) instance after relying on 3rd parties for so long. I guess now my account has no security whatsoever. I guess I'm never publishing to npm again. EDIT: OR hey, maybe I am! Since you reduced the security of my account I now can't be held liable for anyone taking control and publishing whatever. Brilliant, boys. |
Beta Was this translation helpful? Give feedback.
-
|
Hey! I completely understand why this is frustrating, but there's actually a very good security reason for the change. To answer your overall question about what's wrong with TOTP: The main problem with TOTP is that 6-digit codes are susceptible to phishing attacks. If a phishing site for npm asks for your code, hackers can immediately steal it and take over your packages. FIDO and WebAuthn solve this entirely because they check the domain of the actual website. A phishing site can't steal your login. Also, don't worry about the "walled garden" issue! FIDO and WebAuthn are actually open web standards (W3C), not controlled by any one company. They also support Linux and Firefox. You don't need a Macbook or Windows Hello to use them. You can simply use: A USB security key (there are even open-source ones like SoloKeys). A cross-platform password manager like Bitwarden, which supports passkeys directly in the Firefox browser. Hope this clears things up! |
Beta Was this translation helpful? Give feedback.
-
|
Just wanted to thank @AbhishekKTech , @Guten-Morgen1302 , @gunavardhangolagani , and the other goons @ microsoft, for helping extinguish another microsoft product - it would have been nice if you didn't go out of your way to destroy a community, and force everyone to repair bridges and build entirely new communities to replace the one you destroyed, but at least you are being overt enough that everyone is leaving. Next time, just build your own thing, let it fail, instead of buying something pre-established and killing that - there's plenty of benign things of your own you can kill off, if you find that sort of behaviour to be necessary for whatever reason. |
Beta Was this translation helpful? Give feedback.
-
|
Hey guys, fair points all around. @LeonMueller-OneAndOnly I completely agree that the friction for small teams is a pain. Setting up an organization is definitely more annoying than just sharing a TOTP QR code. It is a strict trade-off of convenience for security, and I get why that is frustrating. @quinndiggitypolymath To clarify the Bitwarden thing: the issue has nothing to do with Bitwarden being insecure. The vulnerability with TOTP is that a human can be tricked into typing that 6-digit code into a fake phishing site. Passkeys fix this because they are cryptographically tied to the actual website domain. Even if your passkey is stored in Bitwarden, the browser physically will not let you authenticate on a fake, lookalike npm login page. It completely removes the human error part of phishing. Just sharing the technical reason behind the shift! This highlights the exact kind of devastating ecosystem compromises that forced npm to make these drastic, strict security changes in the first place. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I've been aghast to know that
npmis now phasing out TOTP as a legitimate 2FA method of authentication and replacing it with more intrusive and authoritarian methods like FIDO and Webauthn.It's a bit perplexing that an organization that apparently stands up for Open Source as a way of life would introduce such a closed and walled garden approach of authentication which may not be accessible to everyone. Those on Linux Desktops such as Mint or Fedora, or those using an open source browser like Firefox, may not have access to these chosen new 2FA methods.
I'd also like to know what exactly is the issue with TOTP as an authentication system, what do the proponents of this new system think is wrong with it?
Beta Was this translation helpful? Give feedback.
All reactions