yeojz / otplib

:key: One Time Password (OTP) / 2FA for Node.js and Browser - Supports HOTP, TOTP and Google Authenticator

Home Page:https://otplib.yeojz.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot generate authenticator token every 15secs instead of default 30secs

apyd16 opened this issue · comments

commented

I am not able to reduce the default time limit of 30secs to 15 secs to generate authenticator token, below is the code I am trying.

otplib.authenticator.options={
   epoch: Date.now(),
  step: 15,
  window: 0,
}
const code = otplib.authenticator.generate(secret);

please suggest