簡體   English   中英

有沒有辦法增加 Speakeasy 的令牌過期時間

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM