Open suprim12 opened 3 years ago
first thank you for your attention and spent time ==> the same behaviour ... is there is any contradiction with any windows files permissions i think the problem there i tested the old code and the new one by you give true on various machines and false on one machine even it generate the code successfully but when verifying is the problem
I tried your solution but the problem still occurs , my code :
import speakeasy from "./speakeasy";
const secret = "AZAD22113ADASDJQF";
const token = speakeasy.totp({
secret: secret,
encoding: "ascii",
step: 600,
});
const isValid = speakeasy.totp.verify({
secret: secret,
token: code,
encoding: "ascii",
window: 2,
});
Basic Usage