Fix incorrect 2fa type detection
This commit is contained in:
parent
0c34cfcc5e
commit
35bb9284d6
1 changed files with 6 additions and 1 deletions
|
@ -115,7 +115,12 @@ class Code {
|
|||
}
|
||||
|
||||
static Type _getType(Uri uri) {
|
||||
return uri.host == "totp" ? Type.totp : Type.hotp;
|
||||
if (uri.host == "totp") {
|
||||
return Type.totp;
|
||||
} else if (uri.host == "hotp") {
|
||||
return Type.hotp;
|
||||
}
|
||||
throw UnsupportedError("Unsupported format with host ${uri.host}");
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Add table
Reference in a new issue