Fix incorrect 2fa type detection

This commit is contained in:
Neeraj Gupta 2023-02-05 01:02:16 +05:30
parent 0c34cfcc5e
commit 35bb9284d6
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -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