diff options
author | Julien Deniau <julien.deniau@gmail.com> | 2018-07-21 01:03:35 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-07-21 01:03:35 +0300 |
commit | 21cf0ab68cf528d5244ae664133ef400bdcfbdb6 (patch) | |
tree | 455d573ce029353a3249e995dbfb4cb3c8b21170 /lib/profile.js | |
parent | a9ac8712dfafcb31a4e3deca24ddb92ff75e942d (diff) |
profile: better explanation on OTP (#24)
Use the defaut OTP explanation everywhere except when the context is
"OTP-aware" (like when setting double-authentication)
PR-URL: https://github.com/npm/cli/pull/24
Credit: @jdeniau
Reviewed-By: @zkat
Diffstat (limited to 'lib/profile.js')
-rw-r--r-- | lib/profile.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/profile.js b/lib/profile.js index 18bc8158e..ff01db90f 100644 --- a/lib/profile.js +++ b/lib/profile.js @@ -195,7 +195,7 @@ function set (args) { newUser[prop] = value return profile.set(newUser, conf).catch((err) => { if (err.code !== 'EOTP') throw err - return readUserInfo.otp('Enter OTP: ').then((otp) => { + return readUserInfo.otp().then((otp) => { conf.auth.otp = otp return profile.set(newUser, conf) }) @@ -262,7 +262,7 @@ function enable2fa (args) { return pulseTillDone.withPromise(profile.set({tfa: {password, mode: 'disable'}}, conf)) } else { if (conf.auth.otp) return - return readUserInfo.otp('Enter OTP: ').then((otp) => { + return readUserInfo.otp('Enter one-time password from your authenticator app: ').then((otp) => { conf.auth.otp = otp }) } |