FA.generateQr()

Generates a QR code to store it by scanning the QR code.

Usage

Hover over inputs/exits for more info.

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


// Generates a QR code to store it by scanning the QR code.

FA.generateQr({

application: 'MachineDev',

username: 'John',

key: '44xtha1v228542u5q6ddxzdoukji1m74',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

application required

The name of the application

'MachineDev'
username required

The name of the user/account.

'John'
key required

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

'44xtha1v228542u5q6ddxzdoukji1m74'

Exits

error

An unexpected error occurred.

success

OK.

'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPUAAAD1CAAAAACt2uy5AAADJElEQVR42u3bwW4iMRAEUP7/p8kxUsSYKnsiEvtx2l3AzJuVGrureTxPfDyoqampqampqampqampqampqal79eP94/t110u/ePGPf7tc5dXbXr04vVJqauqD1WNN/+wlJFggvQnxtVBTU5+mDir35V+Dd9y9VHpPqKmpqUfPXm43x1va8RPjqk9NTU19mzq4ypXLT7ev1NTU1PMn6ODy00J+2WT8e10Famrqf6auso+P/uljiQ81NfVfV8fjHatJbpWHBJqluRRqaur91JN9uZSUPpF+WjXxQk1NfZI6yFarZl/w3mqBIBlZ2pFSU1Nvpa4+brK+9ksFXcWl8zU1NfWm6r6GB4FFcJXBPblcJTn6U1NTn6YeR63pLNzyhrfqUi71SKmpqTdVB+28IG8NDtTL2+EqGaGmpj5JPS7fwQf3s3V9qU7vGDU19cHqqhinoUhwhu/zkGplamrqg9VjYX/SHu9m+1X6+k9NTX2SenKDGiyQluDJ8/VSDaempt5KnYau3WTb8EA9OWWXLkpNTX2menKX2k+eTB7Bg+CFmpqa+pkPtfUJxeQ0XnoFaZxLTU19iLraggYfHLTz0sg4PYcvJbnU1NT7qSeP1tXQSZXapjeBmpqa+pmPBlfJQ9VfrN5bjQtTU1OfqQ6KZzVlElTp/sbc9AsIamrqndWTU8FpLzF4b1/hqampqd8GIFXN7fuBVbcwiTiWe6TU1NT/W9037K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