diff --git a/auth/lib/utils/totp_util.dart b/auth/lib/utils/totp_util.dart index 3de7f5047..0d6a8bd68 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,