fix: revert totp changes
This commit is contained in:
@@ -9,8 +9,7 @@ String getOTP(Code code) {
|
||||
return otp.OTP.generateTOTPCodeString(
|
||||
getSanitizedSecret(code.secret),
|
||||
DateTime.now().millisecondsSinceEpoch,
|
||||
length:
|
||||
code.issuer.toLowerCase() == "steam" ? Code.steamDigits : code.digits,
|
||||
length: code.digits,
|
||||
interval: code.period,
|
||||
algorithm: _getAlgorithm(code),
|
||||
isGoogle: true,
|
||||
@@ -21,8 +20,7 @@ String _getHOTPCode(Code code) {
|
||||
return otp.OTP.generateHOTPCodeString(
|
||||
getSanitizedSecret(code.secret),
|
||||
code.counter,
|
||||
length:
|
||||
code.issuer.toLowerCase() == "steam" ? Code.steamDigits : code.digits,
|
||||
length: code.digits,
|
||||
algorithm: _getAlgorithm(code),
|
||||
isGoogle: true,
|
||||
);
|
||||
@@ -32,8 +30,7 @@ String getNextTotp(Code code) {
|
||||
return otp.OTP.generateTOTPCodeString(
|
||||
getSanitizedSecret(code.secret),
|
||||
DateTime.now().millisecondsSinceEpoch + code.period * 1000,
|
||||
length:
|
||||
code.issuer.toLowerCase() == "steam" ? Code.steamDigits : code.digits,
|
||||
length: code.digits,
|
||||
interval: code.period,
|
||||
algorithm: _getAlgorithm(code),
|
||||
isGoogle: true,
|
||||
|
||||
Reference in New Issue
Block a user