[auth] Minor fixes
This commit is contained in:
@@ -116,16 +116,17 @@ class Code {
|
||||
Algorithm? algorithm,
|
||||
) {
|
||||
final String encodedIssuer = Uri.encodeQueryComponent(issuer);
|
||||
final Algorithm algo = algorithm ?? Algorithm.sha1;
|
||||
return Code(
|
||||
account,
|
||||
issuer,
|
||||
digits,
|
||||
defaultPeriod,
|
||||
secret,
|
||||
algorithm ?? Algorithm.sha1,
|
||||
algo,
|
||||
type,
|
||||
0,
|
||||
"otpauth://${type.name}/$issuer:$account?algorithm=SHA1&digits=$digits&issuer=$encodedIssuer&period=30&secret=$secret",
|
||||
"otpauth://${type.name}/$issuer:$account?algorithm=${algo.name.toUpperCase()}&digits=$digits&issuer=$encodedIssuer&period=30&secret=$secret",
|
||||
display: display ?? CodeDisplay(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user