Skip to content

[BUG] login does not work without a browser #8575

@aredridel

Description

@aredridel

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

:; 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

  1. In this environment... A remote ubuntu session, connected via SSH
  2. With this config... Defaults
  3. Run npm login
  4. See censored URL.

Environment

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions