Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Kitchens <bernard@npmjs.com>2020-03-14 00:22:58 +0300
committerDarcy Clarke <darcy@darcyclarke.me>2020-03-18 19:25:38 +0300
commit4ad2214873cddfd4a0eff1bd188516b08fae9f9e (patch)
tree223731be523c297d3394a9159ca81504ec886ca9
parent7d8e5b99c4ef8c394cffa7fc845f54a25ff37e3a (diff)
docs(teams): updated team docs to reflect new MFA workflow for npm team api
PR-URL: https://github.com/npm/cli/pull/1020 Credit: @ Close: #1020 Reviewed-by: @darcyclarke
-rw-r--r--docs/content/cli-commands/npm-team.md2
-rw-r--r--lib/team.js8
2 files changed, 6 insertions, 4 deletions
diff --git a/docs/content/cli-commands/npm-team.md b/docs/content/cli-commands/npm-team.md
index 818147bb7..53e084d47 100644
--- a/docs/content/cli-commands/npm-team.md
+++ b/docs/content/cli-commands/npm-team.md
@@ -30,6 +30,8 @@ handle permissions for packages.
Teams must always be fully qualified with the organization/scope they belong to
when operating on them, separated by a colon (`:`). That is, if you have a `wombats` team in a `wisdom` organization, you must always refer to that team as `wisdom:wombats` in these commands.
+If you have two-factor authentication enabled in `auth-and-writes` mode, then you can provide a code from your authenticator with `[--otp <otpcode>]`. If you don't include this then you will be prompted.
+
* create / destroy:
Create a new team, or destroy an existing one. Note: You cannot remove the `developers` team, <a href="https://docs.npmjs.com/about-developers-team" target="_blank">learn more.</a>
* add / rm:
diff --git a/lib/team.js b/lib/team.js
index 2b56e3b14..e24f73347 100644
--- a/lib/team.js
+++ b/lib/team.js
@@ -14,10 +14,10 @@ team.subcommands = ['create', 'destroy', 'add', 'rm', 'ls', 'edit']
team.usage = usage(
'team',
- 'npm team create <scope:team>\n' +
- 'npm team destroy <scope:team>\n' +
- 'npm team add <scope:team> <user>\n' +
- 'npm team rm <scope:team> <user>\n' +
+ 'npm team create <scope:team> [--otp <otpcode>]\n' +
+ 'npm team destroy <scope:team> [--otp <otpcode>]\n' +
+ 'npm team add <scope:team> <user> [--otp <otpcode>]\n' +
+ 'npm team rm <scope:team> <user> [--otp <otpcode>]\n' +
'npm team ls <scope>|<scope:team>\n' +
'npm team edit <scope:team>'
)