Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Handle steam import from bitwarden

Neeraj Gupta122a84c81889
diff --git a/auth/lib/ui/settings/data/import/bitwarden_import.dart b/auth/lib/ui/settings/data/import/bitwarden_import.dart
index 6878fa9f05..1b6d877cf5 100644
--- a/auth/lib/ui/settings/data/import/bitwarden_import.dart
+++ b/auth/lib/ui/settings/data/import/bitwarden_import.dart
@@ -84,13 +84,22 @@ Future<int?> _processBitwardenExportFile(
var totp = item['login']['totp'];
Code code;
-
if (totp.contains("otpauth://")) {
code = Code.fromOTPAuthUrl(totp);
+ } else if (totp.contains("steam://")) {
+ // "totp": "steam://AAABBBCCCDDDEEEFFF"
+ var secret = totp.split("steam://")[1];
+ code = Code.fromAccountAndSecret(
+ Type.steam,
+ item['login']['username'],
+ item['name'],
+ secret,
+ null,
+ Code.steamDigits,
+ );
} else {
var issuer = item['name'];
var account = item['login']['username'];
-
code = Code.fromAccountAndSecret(
Type.totp,
account,