@@ -88,11 +88,11 @@ function config () {
8888}
8989
9090const knownProfileKeys = qw `
91- name email ${ 'two factor auth' } fullname homepage
91+ name email ${ 'two- factor auth' } fullname homepage
9292 freenode twitter github created updated`
9393
9494function get ( args ) {
95- const tfa = 'two factor auth'
95+ const tfa = 'two- factor auth'
9696 const conf = config ( )
9797 return pulseTillDone . withPromise ( profile . get ( conf ) ) . then ( ( info ) => {
9898 if ( ! info . cidr_whitelist ) delete info . cidr_whitelist
@@ -205,7 +205,7 @@ function enable2fa (args) {
205205 }
206206 const mode = args [ 0 ] || 'auth-and-writes'
207207 if ( mode !== 'auth-only' && mode !== 'auth-and-writes' ) {
208- return Promise . reject ( new Error ( `Invalid two factor authentication mode "${ mode } ".\n` +
208+ return Promise . reject ( new Error ( `Invalid two- factor authentication mode "${ mode } ".\n` +
209209 'Valid modes are:\n' +
210210 ' auth-only - Require two-factor authentication only when logging in\n' +
211211 ' auth-and-writes - Require two-factor authentication when logging in AND when publishing' ) )
@@ -238,7 +238,7 @@ function enable2fa (args) {
238238 }
239239 } )
240240 } ) . then ( ( ) => {
241- log . info ( 'profile' , 'Setting two factor authentication to ' + mode )
241+ log . info ( 'profile' , 'Setting two- factor authentication to ' + mode )
242242 return pulseTillDone . withPromise ( profile . set ( info , conf ) )
243243 } ) . then ( ( challenge ) => {
244244 if ( challenge . tfa === null ) {
@@ -255,10 +255,10 @@ function enable2fa (args) {
255255 } ) . then ( ( code ) => {
256256 return readUserInfo . otp ( 'And an OTP code from your authenticator: ' )
257257 } ) . then ( ( otp1 ) => {
258- log . info ( 'profile' , 'Finalizing two factor authentication' )
258+ log . info ( 'profile' , 'Finalizing two- factor authentication' )
259259 return profile . set ( { tfa : [ otp1 ] } , conf )
260260 } ) . then ( ( result ) => {
261- output ( 'TFA successfully enabled. Below are your recovery codes, please print these out.' )
261+ output ( '2FA successfully enabled. Below are your recovery codes, please print these out.' )
262262 output ( 'You will need these to recover access to your account if you lose your authentication device.' )
263263 result . tfa . forEach ( ( c ) => output ( '\t' + c ) )
264264 } )
0 commit comments