Currently i am using speakeasy to generate a OTP for two factor authentication.
speakeasy.totp({
secret,
encoding: 'base32'
});
I am generating the token using this. Its expiration time is 30s.
Can anyone know how to increase it?
I tried this. But it always return true when verifying the token.
speakeasy.totp({
secret,
encoding: 'base32',
time: 60,
});
speakeasy.totp.verify({
secret: secretKey,
encoding: 'base32',
token: code,
time : 60
});
try { step: 60,//in minute(30sec defaultx2) window:5,//expiry set to 5 minute }