目前,我正在使用speakeasy生成一个用于双因素身份验证的OTP。
speakeasy.totp({
secret,
encoding: 'base32'
});我正在使用这个生成令牌。过期时间为30秒。
有人知道如何增加它吗?
我试过了。但是在验证令牌时,它总是返回true。
speakeasy.totp({
secret,
encoding: 'base32',
time: 60,
});
speakeasy.totp.verify({
secret: secretKey,
encoding: 'base32',
token: code,
time : 60
});发布于 2021-02-05 00:37:13
尝试{步骤: 60,//分钟(30秒defaultx2)窗口:5,//过期时间设置为5分钟}
https://stackoverflow.com/questions/65868384
复制相似问题