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
path: root/lib
diff options
context:
space:
mode:
authorJulian Møller Ellehauge <jumoel@github.com>2022-06-02 00:11:58 +0300
committerGitHub <noreply@github.com>2022-06-02 00:11:58 +0300
commita8ae17775a24ccbaf4570530d7433e0d290b3793 (patch)
tree6104c2ef20d04c475f45be88146ebbe23b73cb1d /lib
parentaee6fc857458ac660bf90ecd0af94212c7269fd7 (diff)
feat: Add `--auth-type=webauthn` flag (#4931)
* feat: Add --use-webauth flag * Add docs * Switch from a separate flag to a variation of auth-type * Update snapshot
Diffstat (limited to 'lib')
-rw-r--r--lib/commands/adduser.js2
-rw-r--r--lib/utils/config/definitions.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/commands/adduser.js b/lib/commands/adduser.js
index 755abea8e..cf467b7a7 100644
--- a/lib/commands/adduser.js
+++ b/lib/commands/adduser.js
@@ -3,6 +3,7 @@ const replaceInfo = require('../utils/replace-info.js')
const BaseCommand = require('../base-command.js')
const authTypes = {
legacy: require('../auth/legacy.js'),
+ webauthn: require('../auth/legacy.js'),
oauth: require('../auth/oauth.js'),
saml: require('../auth/saml.js'),
sso: require('../auth/sso.js'),
@@ -14,6 +15,7 @@ class AddUser extends BaseCommand {
static params = [
'registry',
'scope',
+ 'auth-type',
]
static ignoreImplicitWorkspace = true
diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js
index 92fbbd1e6..4032c552e 100644
--- a/lib/utils/config/definitions.js
+++ b/lib/utils/config/definitions.js
@@ -238,13 +238,15 @@ define('audit-level', {
define('auth-type', {
default: 'legacy',
- type: ['legacy', 'sso', 'saml', 'oauth'],
+ type: ['legacy', 'webauthn', 'sso', 'saml', 'oauth'],
deprecated: `
- This method of SSO/SAML/OAuth is deprecated and will be removed in
+ The SSO/SAML/OAuth methods are deprecated and will be removed in
a future version of npm in favor of web-based login.
`,
description: `
What authentication strategy to use with \`adduser\`/\`login\`.
+
+ Pass \`webauthn\` to use a web-based login.
`,
flatten,
})