npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Can't enable 2FA for Authorization and Publishing

What I Wanted to Do

Activate Two-Factor Authentication for Authorization and Publishing

What Happened Instead

It always keeps returning to “Authorization” only and, if running npm profile get, keeps saying that my two-factor auth is disabled.

Reproduction Steps

  1. Activate 2FA under profile settings
  2. Use password to login
  3. Under 2FA mode, select “Authorization and Publishing”
  4. Going to next step, it will automatically return to “Authorization” (the first selection)
  5. Scan QR code using Google Authenticator
  6. Log out of npm in your command line
  7. Log in to npm in your command line
  8. Type npm profile get
  9. See “Two Fact Auth” as disabled


Update: If someone else has this problem. I fixed it by enable 2FA via command line.
I followed npm docs for npm profile: https://docs.npmjs.com/cli/profile.html