diff --git a/lib/token.js b/lib/token.js index 9b1fbef9cecf4..b2c89b5ba2041 100644 --- a/lib/token.js +++ b/lib/token.js @@ -118,9 +118,10 @@ function config () { }) } else { conf = conf.concat({ auth: {} }) - conf.auth = {} } - if (conf.otp) conf.auth.otp = conf.otp + if (conf.otp) { + conf = conf.concat({ auth: { otp: conf.otp } }) + } return conf }