Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

No documentation for "npm login"? #16487

Closed
rehierl opened this issue May 1, 2017 · 5 comments
Closed

No documentation for "npm login"? #16487

rehierl opened this issue May 1, 2017 · 5 comments

Comments

@rehierl
Copy link

rehierl commented May 1, 2017

  • executing "npm login" on a terminal will work. it will ask for Username, Password, Email and then confirms successful login to "https://registry.npmjs.org/".
  • so that command is actually supported!

markdown files

documentation on npmjs.com

supporting information:

  • npm -v prints: "4.2.0"
  • node -v prints: "v7.9.0"
  • npm config get registry prints: "https://registry.npmjs.org/"
  • Windows, OS X/macOS, or Linux?: Linux x64
@kenany
Copy link
Contributor

kenany commented May 1, 2017

npm login is an alias for npm adduser, hence why it doesn't get it's own page (because it would be an exact duplicate of the npm adduser page).

@rehierl
Copy link
Author

rehierl commented May 1, 2017

"npm login" is an alias for "npm adduser"

Oh I see, thanks. I didn't look at that command because I didn't want to "add a new user".

--

By letting "npm login" behave identical to "npm adduser", you essentially assume that they also have the exact same meaning. Isn't that a little problematic?

What happens if I accidentally mistype my login/name?
I assume that a new account will be created? Is that acceptable?

@kenany
Copy link
Contributor

kenany commented May 1, 2017

@rehierl Yup, you're right. A typo will create a new account, even though that's probably not what anyone wants to happen. See the previous discussions #4151 and #8337. My understanding is that eventually, npm adduser and npm login will become separate from each other.

@rehierl
Copy link
Author

rehierl commented May 2, 2017

Ha, I almost expected a "Now that won't happen." kind of answer.
Thanks again KenanY.

Closing this issue, because the missing documentation turned out to be no mishap.

--

IMHO, I'd even deprecate/remove the adduser command because account creation should be done by signing up directly to a registry. Also, if the maintainers of a private registry wanted to control who is publishing, they would have to partially disable that command by returning an error if the username doesn't exist.

And I wouldn't add a 'delete user' command as mentioned by othiym23 in 8337. This would be asking for abuse. A user should have to directly log into a registry and use the account settings to mark his/her account for deletion.

@rehierl rehierl closed this as completed May 2, 2017
@estaub
Copy link

estaub commented Feb 25, 2018

@rehieri It took me 10 or so minutes of googling to finally come across this thread to understand where login is documented. It being an alias for something else isn't a good reason not to document it - docs are for people who don't know that! Other doc on the site, such as https://docs.npmjs.com/private-modules/intro , use login, which is why I needed to look it up in the first place.

It's fine if the doc is just a "See adduser" link.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants