daegalus / dart-otp

RFC6238 Time-Based One-Time Password / Google Authenticator Library
MIT License
100 stars 25 forks source link

Error in readme #27

Closed timosturm closed 3 years ago

timosturm commented 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

and

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.

daegalus commented 3 years ago

Thank you for this. The code is the correct one so I will update the readme soon.

daegalus commented 3 years ago

Fixed in latest commit.