Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn adduser changes, undeprecate --auth-type, but warn for some values #5149

Merged
merged 2 commits into from
Jul 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: notify on adduser of upcoming cmds, login and register
fritzy committed Jul 11, 2022
commit 3fb6fb9b6f301e8cf4e5dee1144141b35e646bb3
4 changes: 4 additions & 0 deletions lib/commands/adduser.js
Original file line number Diff line number Diff line change
@@ -28,6 +28,10 @@ class AddUser extends BaseCommand {

log.disableProgress()

log.warn('adduser',
'`adduser` will be split into `login` and `register in a future version.'
+ ' `adduser` will become an alias of `register`.'
+ ' `login` (currently an alias) will become its own command.')
log.notice('', `Log in on ${replaceInfo(registry)}`)

const { message, newCreds } = await auth(this.npm, {
6 changes: 1 addition & 5 deletions lib/utils/config/definitions.js
Original file line number Diff line number Diff line change
@@ -239,12 +239,8 @@ define('audit-level', {
define('auth-type', {
default: 'legacy',
type: ['legacy', 'webauthn', 'sso', 'saml', 'oauth'],
deprecated: `
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\`.
What authentication strategy to use with \`login\`.

Pass \`webauthn\` to use a web-based login.
`,