FA.generateCode()

Generates a Code using the users secret key which can then be verified

Usage

Hover over inputs/exits for more info.

var FA = require('machinepack-2fa');


// Generates a Code using the users secret key which can then be verified

FA.generateCode({

key: '44xtha1v228542u5q6ddxzdoukji1m74',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

key required

The secret key, which is to be stored with the userdata.

'44xtha1v228542u5q6ddxzdoukji1m74'

Exits

error

An unexpected error occurred.

success

OK.

'123456'