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/token.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/token.js')
-rw-r--r-- | lib/token.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/token.js b/lib/token.js index 8745bf9b0..d442d37eb 100644 --- a/lib/token.js +++ b/lib/token.js @@ -164,7 +164,7 @@ function rm (args) { return profile.removeToken(key, conf).catch((ex) => { if (ex.code !== 'EOTP') throw ex log.info('token', 'failed because revoking this token requires OTP') - return readUserInfo.otp('Authenticator provided OTP:').then((otp) => { + return readUserInfo.otp().then((otp) => { conf.auth.otp = otp return profile.removeToken(key, conf) }) @@ -192,7 +192,7 @@ function create (args) { return profile.createToken(password, readonly, validCIDR, conf).catch((ex) => { if (ex.code !== 'EOTP') throw ex log.info('token', 'failed because it requires OTP') - return readUserInfo.otp('Authenticator provided OTP:').then((otp) => { + return readUserInfo.otp().then((otp) => { conf.auth.otp = otp log.info('token', 'creating with OTP') return pulseTillDone.withPromise(profile.createToken(password, readonly, validCIDR, conf)) |