Closed timosturm closed 3 years ago
The readme here, here and here state the following:
OTP.generateTOTPCode(String secret, int currentTime, {int length: 6, int interval: 30, Algorithm algorithm: Algorithm.SHA1, bool isGoogle: true})
and
OTP.generateTOTPCodeString(String secret, int currentTime, {int length: 6, int interval: 30, Algorithm algorithm: Algorithm.SHA1, bool isGoogle: true})
The default value for isGoogle is supposed to be true but in the code, it is actually set to false. See: https://github.com/Daegalus/dart-otp/blob/9617cce0bf8268c93826f88eac24733808376370/lib/otp.dart#L22
isGoogle
true
false
https://github.com/Daegalus/dart-otp/blob/9617cce0bf8268c93826f88eac24733808376370/lib/otp.dart#L36
I do not know which is the intended value, so I just leave this here.
Thank you for this. The code is the correct one so I will update the readme soon.
Fixed in latest commit.
The readme here, here and here state the following:
and
The default value for
isGoogle
is supposed to betrue
but in the code, it is actually set tofalse
. See: https://github.com/Daegalus/dart-otp/blob/9617cce0bf8268c93826f88eac24733808376370/lib/otp.dart#L22and
https://github.com/Daegalus/dart-otp/blob/9617cce0bf8268c93826f88eac24733808376370/lib/otp.dart#L36
I do not know which is the intended value, so I just leave this here.