Skip to content

Commit

Permalink
chore: update one-time password prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyclarke authored and Darcy Clarke committed Dec 2, 2021
1 parent 6734ba3 commit 47828b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/auth/legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions lib/commands/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '
)
}
}
Expand Down Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions test/lib/commands/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 47828b7

Please sign in to comment.