[auth] Fix import

This commit is contained in:
Neeraj Gupta 2025-01-14 09:40:00 +05:30
parent d08bb5ea11
commit d2b16bd84b

View File

@ -118,10 +118,10 @@ List<Code> parseGoogleAuth(String qrCodeData) {
if (otpParameter.type == MigrationPayload_OtpType.OTP_TYPE_TOTP ||
otpParameter.type == MigrationPayload_OtpType.OTP_TYPE_UNSPECIFIED) {
otpUrl =
'otpauth://totp/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=$algorithm&digits=$digits&period=$timer';
'otpauth://totp/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=${algorithm.name}&digits=$digits&period=$timer';
} else if (otpParameter.type == MigrationPayload_OtpType.OTP_TYPE_HOTP) {
otpUrl =
'otpauth://hotp/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=$algorithm&digits=$digits&counter=$counter';
'otpauth://hotp/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=${algorithm.name}&digits=$digits&counter=$counter';
} else {
throw Exception('Invalid OTP type');
}