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
fix(webauth): improve error messages around webauth in non-TTY (#8952)
## Add webauth URLs to EOTP error messages
When npm returns an EOTP error with `authUrl` and `doneUrl` in the
response body (web-based OTP flow), these URLs are now included in the
error output.
**What:**
- Display `authUrl` (for browser authentication) and `doneUrl` (for
token retrieval) in non-TTY EOTP error messages
- Include both URLs in `--json` output as `error.authUrl` and
`error.doneUrl`
- Adjusted messaging to differentiate webauth flow from traditional TOTP
authenticator flow
**Why:**
- In non-interactive/CI environments, the webauth URLs were not
surfaced, making it impossible to complete authentication
- Tools wrapping `npm publish` (like
[changesets](changesets/changesets#1773)) need
access to these URLs to implement web OTP support
- The `doneUrl` is required for polling to retrieve the token after
browser authentication completes
exports[`test/lib/utils/error-message.js TAP eotp/e401 www-authenticate challenges Basic realm=by, charset="UTF-8", challenge="your friends" > must match snapshot 1`]=`
0 commit comments