[英]Is there a way to increase the token expiration time of Speakeasy
目前我正在使用 Speakeasy 為兩因素身份驗證生成 OTP。
speakeasy.totp({
secret,
encoding: 'base32'
});
我正在使用它生成令牌。 它的到期時間是30s。
有誰知道怎么增加嗎?
我試過這個。 但是在驗證令牌時它總是返回 true。
speakeasy.totp({
secret,
encoding: 'base32',
time: 60,
});
speakeasy.totp.verify({
secret: secretKey,
encoding: 'base32',
token: code,
time : 60
});
嘗試 { step: 60,//in minute(30sec defaultx2) window:5,//expiry 設置為 5 分鍾 }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.