npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

NPM CLI new feature request - User API

At the BBC, we only want to allow users who have 2fa enabled accounts to join our organisation. I’d love there to be an API which exposes whether a user has 2fa from the cli. This way we can automate the process of checking whether the user meets the criteria for joining.

For example:

npm user danm

Returns all publicly available data including whether 2fa is enabled

  "username": "danm",
  "name": "daniel morrison",
  "github": "danm",
  "twitter": "danm___",
  "2fa": true,
  "packages": [
      "name": "nodestash",
      "description": "Parse logs using just NodeJS",
      "status": "published",
      "version": "0.0.9",
      "lastPublished": "a year ago" // or JS Date
    }, ...
  "organizations": [