2FA prevents uploads on slow connections

security
priority:low
triaged

(C. Scott Ananian) #1

This is a copy of https://github.com/npm/npm/issues/19425

What I Wanted to Do

I have enabled 2FA authentication on my account which is working without problem when publishing small packages.

What Happened Instead

My internet connection is slow, so when I try to publish a larger package the amount of time it takes to upload means that the 2FA code becomes invalid before the upload completes and so an error is always returned from the command.

Reproduction Steps

Throttle your connection and try to publish a large package on an account with 2FA enabled.

Details

I discovered that using a 2FA “recovery” code when prompted for an OTA code is a not-great-but-workable workaround.

Platform Info

$ npm --versions
{ 'wikimedia-langconv': '0.0.0',
  npm: '6.4.1',
  ares: '1.10.1-DEV',
  http_parser: '2.8.0',
  icu: '58.2',
  modules: '48',
  napi: '3',
  node: '6.14.4',
  openssl: '1.0.2p',
  uv: '1.16.1',
  v8: '5.1.281.111',
  zlib: '1.2.11' }
$ node -p process.platform
linux

(Andreas Lind) #2

Duplicate of Cannot publish large package with 2FA enabled and slow network which was automatically closed after 90 days of inactivity :roll_eyes: