sec51 / twofactor

Golang two factor authentication library
ISC License
217 stars 66 forks source link

Sometimes encountered an issue "Could not verify the message. #26

Closed apyong closed 3 years ago

apyong commented 3 years ago

On local dev. Everything seems fine but on deployment sometimes I encounter an error in this part of the code.

otp, err := twofactor.TOTPFromBytes(qrBytesDecoded, "Test")
if err != nil {
    fmt.Println(err)
    return u.Message(false, err.Error())
}

Sometimes it pass through or doesn't at all. Any tips on how to locate or fix this kind of issue?