Lines Matching refs:auth
18 'two-factor auth',
43 'enable-2fa [auth-only|auth-and-writes]',
66 return ['auth-and-writes', 'auth-only']
108 const tfa = 'two-factor auth'
236 throw new Error('npm profile enable-2fa [auth-and-writes|auth-only]')
239 const mode = args[0] || 'auth-and-writes'
240 if (mode !== 'auth-only' && mode !== 'auth-and-writes') {
244 ' auth-only - Require two-factor authentication only when logging in\n' +
245 ' auth-and-writes - Require two-factor authentication when logging in ' +
263 // if they're using legacy auth currently then we have to
266 const auth = {}
269 auth.token = creds.token
271 auth.basic = { username: creds.username, password: creds.password }
272 } else if (creds.auth) {
273 const basic = Buffer.from(creds.auth, 'base64').toString().split(':', 2)
274 auth.basic = { username: basic[0], password: basic[1] }
277 if (!auth.basic && !auth.token) {
284 if (auth.basic) {
287 auth.basic.password, false, [], { ...this.npm.flatOptions }