fix: revert totp changes
This commit is contained in:
parent
8a4229122e
commit
b52133fe57
1 changed files with 3 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue