Use uri.host instead of issuer in _GetDigits
This commit is contained in:
parent
70dc660f5a
commit
227b7ddba0
1 changed files with 3 additions and 3 deletions
|
@ -128,7 +128,7 @@ class Code {
|
||||||
final code = Code(
|
final code = Code(
|
||||||
_getAccount(uri),
|
_getAccount(uri),
|
||||||
issuer,
|
issuer,
|
||||||
_getDigits(uri, issuer),
|
_getDigits(uri),
|
||||||
_getPeriod(uri),
|
_getPeriod(uri),
|
||||||
getSanitizedSecret(uri.queryParameters['secret']!),
|
getSanitizedSecret(uri.queryParameters['secret']!),
|
||||||
_getAlgorithm(uri),
|
_getAlgorithm(uri),
|
||||||
|
@ -201,11 +201,11 @@ class Code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _getDigits(Uri uri, String issuer) {
|
static int _getDigits(Uri uri) {
|
||||||
try {
|
try {
|
||||||
return int.parse(uri.queryParameters['digits']!);
|
return int.parse(uri.queryParameters['digits']!);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (issuer.toLowerCase() == "steam" || issuer.toLowerCase().contains('steampowered.com')) {
|
if (uri.host == "steam") {
|
||||||
return steamDigits;
|
return steamDigits;
|
||||||
}
|
}
|
||||||
return defaultDigits;
|
return defaultDigits;
|
||||||
|
|
Loading…
Reference in a new issue