Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix: revert totp changes

Prateek Sunalb52133fe57a2
diff --git a/auth/lib/utils/totp_util.dart b/auth/lib/utils/totp_util.dart
index 3de7f50477..0d6a8bd68f 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,