diff --git a/auth/lib/utils/totp_util.dart b/auth/lib/utils/totp_util.dart index 3de7f50477e489b0bc201a631f0bd6f9f561a129..0d6a8bd68f6190a2da1ec481ef95455f1ccba501 100644 --- a/auth/lib/utils/totp_util.dart +++ b/auth/lib/utils/totp_util.dart @@ -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,