lib/extension/otp/connection.js
/**
   * Verify HOTP token within a validation window
   * @param {string} token
   * @param {number} counter
   * @param {number} window We HIGHLY encourage keeping it 0 to mitigate replay attacks
   */
Verify HOTP token within a validation window
@param {string} token
@param {number} counter
@param {number} window We HIGHLY encourage keeping it 0 to mitigate replay attacks
Verify HOTP token within a validation window @param { string } token @param { number } counter @param { number } window We HIGHLY encourage keeping it 0 to mitigate replay attacks
verify(token, counter, window = Connection.TOKEN_WINDOW) {
    debug(
      'verify',
      `token=${token}`,
      `secret=${this.secret}`,
      `counter=${counter}`,
      `window=${window}`,
    );
    return speakeasy.hotp.verify({
      secret: this.secret, counter, token, window,
    });
  }
verify ( token , counter , window = Connection . TOKEN_WINDOW ) { debug ( 'verify' , ` ${ token } ` , ` ${ this . secret } ` , ` ${ counter } ` , ` ${ window } ` , ) ; return speakeasy . hotp . verify ( { secret : this . secret , counter , token , window , } ) ; }
Verify HOTP token within a validation window
 @param {string} token
 @param {number} counter
 @param {number} window We HIGHLY encourage keeping it 0 to mitigate replay attacks
Verify HOTP token within a validation window @param { string } token @param { number } counter @param { number } window We HIGHLY encourage keeping it 0 to mitigate replay attacks