Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Deniau <julien.deniau@gmail.com>2018-07-21 01:03:35 +0300
committerKat Marchán <kzm@zkat.tech>2018-07-21 01:03:35 +0300
commit21cf0ab68cf528d5244ae664133ef400bdcfbdb6 (patch)
tree455d573ce029353a3249e995dbfb4cb3c8b21170 /lib/profile.js
parenta9ac8712dfafcb31a4e3deca24ddb92ff75e942d (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.js4
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
})
}