Skip to content

[Feature] Print registry config value before on npm login #2071

Closed

Description

@ruyadorno

Problem:

It is opaque which service will receive credentials for "npm login". This can lead to leaked credentials.

Logging into a non-standard registry is a 2-command process. Not only that, but one can be logged into multiple registries for various scopes. Give a multitude of registries, when I perform "npm login", depending on the flags, my credentials can be sent to a number of services. It would be nice to know exactly which one before credentials are entered.

Solution:

Currently:

$ npm config set registry https://npm.fury.io/USERNAME/
$ npm login
Username: <user>
Password: <pass>
Email: (this IS public) <email>
Logged in as <user> on https://npm.fury.io/USERNAME/.

Proposed:

$ npm config set registry https://npm.fury.io/USERNAME/
$ npm login
Log in on https://npm.fury.io/USERNAME/
Username: <user>
Password: <pass>
Email: (this IS public) <email>
Logged in as <user> on https://npm.fury.io/USERNAME/.

Activity

  1. added
    Enhancementnew feature or improvement
    Release 7.xwork is associated with a specific npm 7 release
    on Oct 28, 2020
  2. shuang2411 commented on Nov 4, 2020

    @shuang2411

    To whom it may concern, would that be ok to assign this issue to me?

  3. ruyadorno commented on Nov 5, 2020

    @ruyadorno
    ContributorAuthor

    Thanks for the interest @shuang2411 but we already have a PR for it over at #2075 😊

  4. added a commit that references this issue on Nov 6, 2020
    7716e42
  5. added this to the OSS - Sprint 19 milestone on Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancementnew feature or improvementGood First Issuegood issue or PR for newcomersRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions