[auth] Minor fix
This commit is contained in:
@@ -112,21 +112,20 @@ class Code {
|
||||
String issuer,
|
||||
String secret,
|
||||
CodeDisplay? display,
|
||||
int digits,
|
||||
Algorithm? algorithm,
|
||||
) {
|
||||
int digits, {
|
||||
Algorithm algorithm = Algorithm.sha1,
|
||||
}) {
|
||||
final String encodedIssuer = Uri.encodeQueryComponent(issuer);
|
||||
final Algorithm algo = algorithm ?? Algorithm.sha1;
|
||||
return Code(
|
||||
account,
|
||||
issuer,
|
||||
digits,
|
||||
defaultPeriod,
|
||||
secret,
|
||||
algo,
|
||||
algorithm,
|
||||
type,
|
||||
0,
|
||||
"otpauth://${type.name}/$issuer:$account?algorithm=${algo.name.toUpperCase()}&digits=$digits&issuer=$encodedIssuer&period=30&secret=$secret",
|
||||
"otpauth://${type.name}/$issuer:$account?algorithm=${algorithm.name.toUpperCase()}&digits=$digits&issuer=$encodedIssuer&period=30&secret=$secret",
|
||||
display: display ?? CodeDisplay(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
|
||||
secret,
|
||||
display,
|
||||
isStreamCode ? Code.steamDigits : digits!,
|
||||
_algorithm,
|
||||
algorithm: _algorithm,
|
||||
)
|
||||
: widget.code!.copyWith(
|
||||
account: account,
|
||||
|
||||
@@ -107,7 +107,6 @@ Future<int?> _processBitwardenExportFile(
|
||||
secret,
|
||||
null,
|
||||
Code.steamDigits,
|
||||
null,
|
||||
);
|
||||
} else {
|
||||
var issuer = item['name'] ?? '';
|
||||
@@ -119,7 +118,6 @@ Future<int?> _processBitwardenExportFile(
|
||||
totp,
|
||||
null,
|
||||
Code.defaultDigits,
|
||||
null,
|
||||
);
|
||||
}
|
||||
if (folderID != null && folderIdToName.containsKey(folderID)) {
|
||||
|
||||
Reference in New Issue
Block a user