mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[auth] Fix steam import from 2fas
This commit is contained in:
parent
5a35edbbab
commit
724dcd97c1
@ -152,14 +152,14 @@ Future<int?> _process2FasExportFile(
|
||||
// Build the OTP URL
|
||||
String otpUrl;
|
||||
|
||||
if (kind.toLowerCase() == 'totp') {
|
||||
if (kind.toLowerCase() == 'totp' || kind.toLowerCase() == 'steam') {
|
||||
otpUrl =
|
||||
'otpauth://$kind/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=$algorithm&digits=$digits&period=$timer';
|
||||
} else if (kind.toLowerCase() == 'hotp') {
|
||||
otpUrl =
|
||||
'otpauth://$kind/$issuer:$account?secret=$secret&issuer=$issuer&algorithm=$algorithm&digits=$digits&counter=$counter';
|
||||
} else {
|
||||
throw Exception('Invalid OTP type');
|
||||
throw Exception('Invalid OTP type ${kind.toLowerCase()}');
|
||||
}
|
||||
parsedCodes.add(Code.fromOTPAuthUrl(otpUrl));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user