Skip to content

Option to disable 2FA #398

@wessberg

Description

@wessberg

Description

With np v5.0.0, 2FA is enabled by default for new packages. However, no option is exposed to disable 2FA.

Lines 198-204 in np/index.js enables 2FA if the package doesn't exist in the registry and if it isn't private.

2FA is definitely the right default, and I encourage everyone to use it. The thing is, np comes with a lot of great defaults, but it also comes with ways of opting out of them. For example:

--no-cleanup
--no-tests
--yolo
--no-publish
--no-yarn
--no-release-draft

In the same vein, something like --no-2fa should be possible. Currently it feels like the odd omission from what is otherwise a quite flexible configuration.

Possible implementation

I suggest exposing a --no-2fa CLI argument that avoids forcing 2FA for new packages.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions