otp-io
Version:
🕖 Typed library to work 2fa via Google Authenticator/Time-based TOTP/Hmac-based HOTP
16 lines • 434 B
JavaScript
;const hmac=require('./crypto/hmac.js'),key=require('./key.js');/**
*
*
* @export
* @return {*} {Required<TOTPOptions>}
*/
function getDefaultTOTPOptions() {
return {
algorithm: hmac.HmacAlgorithm.SHA1,
digits: 6,
now: new Date(),
secret: new key.SecretKey(new Uint8Array()),
stepSeconds: 30,
pad: false
};
}exports.getDefaultTOTPOptions=getDefaultTOTPOptions;