From 47828b766a4a7b50c1245c8f01b99ffbeffd014f Mon Sep 17 00:00:00 2001 From: Darcy Clarke Date: Thu, 2 Dec 2021 10:19:46 -0500 Subject: [PATCH] chore: update one-time password prompt --- lib/auth/legacy.js | 2 +- lib/commands/profile.js | 4 ++-- test/lib/commands/profile.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/auth/legacy.js b/lib/auth/legacy.js index 7929ccc64d7cc..d1401ce14b9ef 100644 --- a/lib/auth/legacy.js +++ b/lib/auth/legacy.js @@ -16,7 +16,7 @@ const login = async (npm, opts) => { const requestOTP = async () => { const otp = await read.otp( - 'Enter one-time password from your authenticator app: ' + 'Enter one-time password: ' ) return profile.loginCouch( diff --git a/lib/commands/profile.js b/lib/commands/profile.js index e1102696e69d1..1250ed7d1c756 100644 --- a/lib/commands/profile.js +++ b/lib/commands/profile.js @@ -321,7 +321,7 @@ class Profile extends BaseCommand { } else if (userInfo && userInfo.tfa) { if (!conf.otp) { conf.otp = await readUserInfo.otp( - 'Enter one-time password from your authenticator app: ' + 'Enter one-time password: ' ) } } @@ -386,7 +386,7 @@ class Profile extends BaseCommand { const password = await readUserInfo.password() if (!conf.otp) { - const msg = 'Enter one-time password from your authenticator app: ' + const msg = 'Enter one-time password: ' conf.otp = await readUserInfo.otp(msg) } diff --git a/test/lib/commands/profile.js b/test/lib/commands/profile.js index 0f16c1db1d295..3d55a37ddb8cf 100644 --- a/test/lib/commands/profile.js +++ b/test/lib/commands/profile.js @@ -689,7 +689,7 @@ t.test('enable-2fa', t => { async otp (label) { t.equal( label, - 'Enter one-time password from your authenticator app: ', + 'Enter one-time password: ', 'should ask for otp confirmation' ) return '123456' @@ -1044,7 +1044,7 @@ t.test('disable-2fa', t => { async otp (label) { t.equal( label, - 'Enter one-time password from your authenticator app: ', + 'Enter one-time password: ', 'should ask for otp confirmation' ) return '1234'