Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2FA not asking for otp via command line #6741

Closed
vecerek opened this issue Nov 29, 2018 · 1 comment
Closed

2FA not asking for otp via command line #6741

vecerek opened this issue Nov 29, 2018 · 1 comment
Assignees
Labels

Comments

@vecerek
Copy link

vecerek commented Nov 29, 2018

Bug report
2FA not working when using yarn publish despite the implementation in #6555 .
cc: @neonowy

What is the current behavior?
There are three cases I tried:

  1. npm login before yarn publish
  2. yarn login before yarn publish
  3. log out and make sure there is no _authCode in ~/.yarnrc before yarn publish

In case 1 and 2 I receive the error "You must provide a one-time pass. Upgrade your client to npm@latest in order to use 2FA."

In case 3, it asks me to log in but even though I type the correct password, I receive an error message saying Incorrect username or password..

STR:

  1. Create a new package from a boilerplate.
  2. Have the following set in your package.json:
{
  ...
  "version": "0.5.0",
  "publishConfig": {
    "access": "public",
    "registry": "https://registry.npmjs.org/"
  },
  ...
}
  1. run yarn publish --new-version major

A bit of background (probably unrelevant to this bug): I've had my package up until now in a private registry, now it's being open sourced. I'm moving the package to NPM with a major version bump.

What is the expected behavior?
In cases 1 and 2, I would expect yarn to execute this line and ask for the OTP code.
In case 3, I would expect it to correctly validate my password and then ask for the OTP code.

Please mention your node.js, yarn and operating system version.

  • Node version: v9.11.1
  • Yarn version: 1.10.1
  • NPM version: 6.4.1 (I'm providing it just because of the error message)
  • OS version: macOS High Sierra 10.13.6 (17G3025)
@ghost ghost assigned arcanis Nov 29, 2018
@ghost ghost added the triaged label Nov 29, 2018
@vecerek
Copy link
Author

vecerek commented Dec 3, 2018

The OTP support was added in a later version. Upgrading yarn helped.

@vecerek vecerek closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants