correct bugs on web interface

This commit is contained in:
Xavier Henner
2019-07-15 17:14:40 +02:00
parent 657f92a3df
commit 53131a7a3b
3 changed files with 8 additions and 9 deletions

2
otp.go
View File

@@ -41,7 +41,7 @@ func (s *OpenVpnMgt) GenerateOTPGeneric(user string, period int, algo string, se
// the first code is the generic one
codes = append(codes, code)
for i := 1; i < 3; i++ {
for i := 1; i < 4; i++ {
code, _ = GenericTotpCode(secret, now.Add(-1*time.Second*time.Duration(period*i)), algo, digits, period)
codes = append(codes, code)
}