mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 22:03:55 +03:00
Generate codes 10s into the future for touch credentials
This commit is contained in:
parent
ad449fd1f8
commit
1f6cefea4f
@ -205,7 +205,8 @@ Python {
|
||||
|
||||
function calculate(entry, copyAfterUpdate) {
|
||||
var now = Math.floor(Date.now() / 1000)
|
||||
do_call('yubikey.controller.calculate', [entry.credential, now],
|
||||
var margin = entry.credential.touch ? 10 : 0;
|
||||
do_call('yubikey.controller.calculate', [entry.credential, now + margin],
|
||||
function (code) {
|
||||
updateSingleCredential(entry.credential, code, copyAfterUpdate)
|
||||
})
|
||||
@ -213,7 +214,8 @@ Python {
|
||||
|
||||
function calculateSlotMode(slot, digits, copyAfterUpdate) {
|
||||
var now = Math.floor(Date.now() / 1000)
|
||||
do_call('yubikey.controller.calculate_slot_mode', [slot, digits, now],
|
||||
var margin = entry.credential.touch ? 10 : 0;
|
||||
do_call('yubikey.controller.calculate_slot_mode', [slot, digits, now + margin],
|
||||
function (entry) {
|
||||
updateSingleCredential(entry.credential, entry.code, copyAfterUpdate)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user