Context:
TOTP verify failed due network latency and transmission delay
as defined in https://tools.ietf.org/html/rfc6238#section-5.2 , The validation system should compare OTPs not only with
the receiving timestamp but also the past timestamps that are within
the transmission delay
need to add a new field to struct e.g DelayWindow , and the verify method check if the type is totp so its generated 3 code for past, current, feature timestamp and validate the user code against three generated codes.
e.g
counters := []uint64{interval()}
if TOTP {
for i := 1; i <= DelayWindow; i++ {
counters = append(counters, counters[0]-i)
counters = append(counters, counters[0]+i)
}
and verify()
Context: TOTP verify failed due network latency and transmission delay as defined in https://tools.ietf.org/html/rfc6238#section-5.2 , The validation system should compare OTPs not only with the receiving timestamp but also the past timestamps that are within the transmission delay
need to add a new field to struct e.g
DelayWindow
, and the verify method check if the type is totp so its generated 3 code for past, current, feature timestamp and validate the user code against three generated codes.e.g