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: display full token when creating authentication tokens (#8709)
Fixes [#8684](#8684)
### What / Why
When running `npm token create`, the created authentication token was
being redacted in the output, making it difficult for users to copy and
use the token. This happened because npm's output system automatically
applies redaction to sensitive information like tokens.
### How
- Import `META` from `proc-log` to access output metadata options
- Use `{ [META]: true, redact: false }` option in `output.standard()` to
disable redaction for the token display line
- This follows the established pattern used in other parts of the
codebase (e.g., `lib/utils/open-url.js`) for displaying sensitive
information that users need to see
### Testing
- All existing tests pass
- The fix preserves the existing output format and test expectations
- Token is now displayed in full while maintaining proper formatting and
colors
### Before
Created publish token npm_***
### After
Created publish token npm_1a2b3c4d5e6f7g8h9i0j
The token can now be copied and used directly without being obscured by
npm's redaction system.
Co-authored-by: Max Black <[email protected]>
0 commit comments