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