-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support 2FA #95
Comments
Can you share the exact error that you encountered? A good place to start looking into would be: Line 36 in 121be23
|
To help work on this I've enabled npm 2fa for publishing on my account. Here is the error I now get:
Not sure yet but guessing some possible solutions:
-- edit Re 3: I think a flag is weird for OTP, it has to be an interactive thing, flag gives little value over prompt Re 4: Yep doesn't make sense, too transient. |
With 2fa enabled here is the login flow:
|
Some official info here https://docs.npmjs.com/about-two-factor-authentication |
With 2fa enabled here is the publish flow:
My conclusion is that when 2fa is enabled we should forward the tty to the user. I don't think this 2fa flow is designed for CI workflows. There is no tty in CI. Since the OTP is ephemeral, this isn't something that could really ever be stored as an environment variable. Therefore bringing 2fa support to dripip is about support its manual use by users, rather than unblocking any issues in CI. I think when we resolve this issue we need to qualify what we mean when we say we support 2fa. I also think this feature isn't a top priority since CI publishing is a best practice and what dripip is designed for first. Still manual publishing is an important escape hatch. And I think it feels uncomfortable to use a tool that won't let you go manual if ever you need to. |
Tried to use this on Nexus at one point, and was unable to publish because I have 2FA on my npm account. Happy to submit a patch for it, if you have any pointers of where this change should be made that'd be super helpful.
The text was updated successfully, but these errors were encountered: