/**
 * Module dependencies.
 */
var TokenError = require('./tokenerror');

/**
 * `TokenError` error.
 *
 * @api public
 */
function MFARequiredError(message, uri, user, areq) {
  TokenError.call(this, message, 'mfa_required', uri);
  Error.captureStackTrace(this, arguments.callee);
  this.name = 'MFARequiredError';
  this.user = user;
  this.req = areq;
}

/**
 * Inherit from `TokenError`.
 */
MFARequiredError.prototype.__proto__ = TokenError.prototype;


/**
 * Expose `MFARequiredError`.
 */
module.exports = MFARequiredError;

/**
 * Module dependencies.
 */
var TokenError = require('./tokenerror');

/**
 * `TokenError` error.
 *
 * @api public
 */
function MFARequiredError(message, uri, user) {
  TokenError.call(this, message, 'mfa_required', uri);
  Error.captureStackTrace(this, arguments.callee);
  this.name = 'MFARequiredError';
  this.user = user;
}

/**
 * Inherit from `TokenError`.
 */
MFARequiredError.prototype.__proto__ = TokenError.prototype;


/**
 * Expose `MFARequiredError`.
 */
module.exports = MFARequiredError;

--- 
+++ 
@@ -8,11 +8,12 @@
  *
  * @api public
  */
-function MFARequiredError(message, uri, user) {
+function MFARequiredError(message, uri, user, areq) {
   TokenError.call(this, message, 'mfa_required', uri);
   Error.captureStackTrace(this, arguments.callee);
   this.name = 'MFARequiredError';
   this.user = user;
+  this.req = areq;
 }
 
 /**
Add request to MFA error for keeping session context.
