[auth] Fix handling of no username during bitwarden import (#2010)
## Description ## Tests
This commit is contained in:
@@ -109,8 +109,8 @@ Future<int?> _processBitwardenExportFile(
|
||||
Code.steamDigits,
|
||||
);
|
||||
} else {
|
||||
var issuer = item['name'];
|
||||
var account = item['login']['username'];
|
||||
var issuer = item['name'] ?? '';
|
||||
var account = item['login']['username'] ?? '';
|
||||
code = Code.fromAccountAndSecret(
|
||||
Type.totp,
|
||||
account,
|
||||
|
||||
@@ -105,7 +105,7 @@ Future<int?> _processRaivoExportFile(BuildContext context, String path) async {
|
||||
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');
|
||||
}
|
||||
parsedCodes.add(Code.fromOTPAuthUrl(otpUrl));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: ente_auth
|
||||
description: ente two-factor authenticator
|
||||
version: 3.0.7+307
|
||||
version: 3.0.8+308
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user