Lines Matching defs:tfa
65 case 'enable-tfa':
69 case 'disable-tfa':
89 case 'enable-tfa':
94 case 'disable-tfa':
108 const tfa = 'two-factor auth'
133 delete cleaned.tfa
137 if (info.tfa && !info.tfa.pending) {
138 cleaned[tfa] = info.tfa.mode
140 cleaned[tfa] = 'disabled'
154 if (key === 'tfa') {
155 this.npm.output(`${key}\t${cleaned[tfa]}`)
258 tfa: {
307 info.tfa.password = password
309 log.info('profile', 'Determine if tfa is pending')
315 if (userInfo && userInfo.tfa && userInfo.tfa.pending) {
318 npmProfile.set({ tfa: { password, mode: 'disable' } }, conf)
320 } else if (userInfo && userInfo.tfa) {
333 if (challenge.tfa === null) {
338 const badResponse = typeof challenge.tfa !== 'string'
339 || !/^otpauth:[/][/]/.test(challenge.tfa)
343 ', got: ' + inspect(challenge.tfa)
347 const otpauth = new URL(challenge.tfa)
349 const code = await qrcode(challenge.tfa)
360 const result = await npmProfile.set({ tfa: [interactiveOTP] }, conf)
371 for (const tfaCode of result.tfa) {
380 if (!info.tfa || info.tfa.pending) {
392 log.info('profile', 'disabling tfa')
395 tfa: { password: password, mode: 'disable' },
399 this.npm.output(JSON.stringify({ tfa: false }, null, 2))
401 this.npm.output('tfa\tfalse')