Handle bad issuerName
This commit is contained in:
parent
ad8fd6224a
commit
d1e1cb983e
1 changed files with 6 additions and 1 deletions
|
@ -77,7 +77,12 @@ class Code {
|
|||
static String _getIssuer(Uri uri) {
|
||||
try {
|
||||
if (uri.queryParameters.containsKey("issuer")) {
|
||||
return uri.queryParameters['issuer']!;
|
||||
String issuerName = uri.queryParameters['issuer']!;
|
||||
// Handle issuer name with period
|
||||
// See https://github.com/ente-io/auth/pull/77
|
||||
if (issuerName.contains("period=")) {
|
||||
return issuerName.substring(0, issuerName.indexOf("period="));
|
||||
}
|
||||
}
|
||||
final String path = Uri.decodeComponent(uri.path);
|
||||
return path.split(':')[0].substring(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue