FLUID-6340: Allow NPM to handle OTP failures when using fluid-publish

Metadata

Source
FLUID-6340
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Colin Clark
Reporter
Justin Obara
Created
2018-09-12T10:07:13.078-0400
Updated
2024-07-22T10:35:11.021-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. fluid-publish

Description

The current 2FA support for NPM requires a one-time password (OTP). We've handled this by allowing the users to pass in an --otp=123456 (where the number is replaced by the specific otp). This works but not when there is a long prepublish step. In those cases it will always time out. NPM is able to handle this by prompting the user to re-enter the otp directly. However, fluid-publish catches the error beforehand so the user is not presented the option to re-enter.

We should not catch the 401 errors and let NPM handle it so that a user can just be prompted. We should still keep the otp flag, which is similar to how NPM works.

Comments

  • Justin Obara commented 2018-09-12T11:25:03.607-0400

    We are not able to conditionally catch errors, but we can share the stdio between the child and parent processes so that users are able to be prompted for the OTP when needed.