Open
Description
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 profile enable-2fa auth-and-writes
npm notice profile Enabling two factor authentication for auth-and-writes
npm password:
Enter one-time password: xxxxxx
npm error Unknown error enabling two-factor authentication. Expected otpauth URL, got: { pending: false, mode: 'auth-and-writes' }
npm error A complete log of this run can be found in: /Users/reggi/.npm/_logs/2025-03-27T16_54_09_998Z-debug-0.log
tfa
here doesn't need to be a string and it's asserting that it should
https://github.com/npm/cli/blob/latest/lib/commands/profile.js#L322
➜ ~ npm profile enable-2fa auth-only
npm notice profile Enabling two factor authentication for auth-only
npm password:
Enter one-time password: xxx
npm error Unknown error enabling two-factor authentication. Expected otpauth URL, got: { pending: false, mode: 'auth-only' }
npm error A complete log of this run can be found in: /Users/reggi/.npm/_logs/2025-03-27T17_07_52_652Z-debug-0.log
Expected Behavior
No response
Steps To Reproduce
- In this environment...
- With this config...
- Run '...'
- See error...
Environment
- npm:
- Node.js:
- OS Name:
- System Model Name:
- npm config:
; copy and paste output from `npm config ls` here