Getting passcode doesn't match our records try again.
Anoupz opened this issue · comments
Describe the bug
I am using the below code to generate the token.. but I get passcode doesn't match error.
import * as otplib from 'otplib'
const token = otplib.totp.generate('secret_code')
But the same works fine with pyotp lib. Any ideas??
import pyotp
totp = pyotp.TOTP('secret_code')
print("Current OTP:", totp.now())
- otplib version: 12.0.1
- os: Mac Os 10.15.7
- browser: Chrome/ Cypress
- node / yarn: 12.16.1
- frameworks (if any): Cypress
Appreciate all the help.
Regards,
Anoop P N
Found this issue using the below code helped to match the passcode
const token = otplib.authenticator.generate('secret_code')