You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:; npm login
npm notice Log in on https://registry.npmjs.org/
Login at:
https://www.npmjs.com/login?next=/login/cli/***
Press ENTER to open in the browser...
Browser unavailable. Please open the URL manually:
https://www.npmjs.com/login?next=/login/cli/***
the URL is censored in both cases, which makes it useless.
Expected Behavior
Login prints the URL so I can open it, and gives me a place to enter a code or uses device flow behind the scenes.
Steps To Reproduce
In this environment... A remote ubuntu session, connected via SSH
Interactive console output should not be redacted, IMO. Log file output, yes. Console output, especially in interactive commands like login, never. If someone chooses to call something like this and log the console output, they've really made their own bed.
While you're there, lib/commands/login should probably not be passing interactive user output through @npm/redact -- something that's been harmless but there's no reason to imagine it would remain that way forever.
This also breaks the npm publish behavior for me, due to hardware security key authentication printing URLs to the console that are now redacted and not functional.
Activity
iarna commentedon Sep 17, 2025
This bug was introduced with #8529
Interactive console output should not be redacted, IMO. Log file output, yes. Console output, especially in interactive commands like login, never. If someone chooses to call something like this and log the console output, they've really made their own bed.
While you're there, lib/commands/login should probably not be passing interactive user output through @npm/redact -- something that's been harmless but there's no reason to imagine it would remain that way forever.
internettrans commentedon Sep 22, 2025
This also breaks the
npm publishbehavior for me, due to hardware security key authentication printing URLs to the console that are now redacted and not functional.Glavin001 commentedon Oct 23, 2025
Is there a workaround for this issue? I appear to be blocked from logging in to npm.
Update:
Workaround: Downgrade
$ nvm install --lts && nvm use --lts $ node --version v22.21.0 $ npm --version 10.9.4internettrans commentedon Oct 24, 2025
My pull request fixing this was superseded by #8614 and released in npm@11.6.2. I think it's fixed in 11.6.2 but haven't tried it yet
aredridel commentedon Oct 24, 2025
Can confirm, fixed in 11.6.2.