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

adduser --always-auth not working #704

Closed
jeffrson opened this issue Jan 19, 2020 · 6 comments
Closed

adduser --always-auth not working #704

jeffrson opened this issue Jan 19, 2020 · 6 comments
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@jeffrson
Copy link

The adduser command has a parameter --always-auth which is supposed to

save configuration indicating that all requests to the given registry should include authorization information

"given registry" refers to the --registry parameter.

So how should this be done? IMO, it should store an additional key inside user's .npmrc, which adds "always-auth" to the registry alongside the access token.

However, it seems nothing is done at all - only the access token appears in .npmrc.

(npm 6.13.6)

@jcestibariz
Copy link

jcestibariz commented Jan 25, 2021

I still can reproduce it with npm 6.14.10. As a workaround I added it manually with npm config but it's annoying.

npm config set //<registry-url>:always-auth true

@ljharb
Copy link
Collaborator

ljharb commented Jan 25, 2021

What about with npm 7?

@ljharb ljharb added Bug thing that needs fixing Needs Triage needs review for next steps Release 6.x work is associated with a specific npm 6 release labels Jan 25, 2021
@jcestibariz
Copy link

@ljharb tested with 7.4.3, same problem

@ljharb ljharb added the Release 7.x work is associated with a specific npm 7 release label Jan 25, 2021
@darcyclarke darcyclarke added Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Feb 2, 2021
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

@ljharb
Copy link
Collaborator

ljharb commented Jun 2, 2021

This is still an issue with npm 7.4.3.

@jeffrson can you confirm if it's still an issue in npm 7 latest?

@ljharb ljharb reopened this Jun 2, 2021
@ljharb ljharb removed the Release 6.x work is associated with a specific npm 6 release label Jun 2, 2021
@wraithgar
Copy link
Member

The --always-auth param was removed recently because of a change in how npm was approaching auth. That flag was a workaround for a bug that has since been fixed, namely that npm was incorrectly determining what auth keys went with what requests. --always-auth was a security concern because it would send whatever auth you had configured to every request you sent.

npm behavior now is to send the auth it has for a given registry on each request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 2 secondary priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

5 participants