Skip to content

Commit 0329042

Browse files
committed
Don't enforce required and current scopes to be same size
Instead require the current scopes only contain all the required scopes
1 parent 8e550b4 commit 0329042

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/src/main/java/com/github/mobile/accounts/AccountAuthenticator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ private boolean isValidAuthorization(final Authorization auth,
102102
return false;
103103

104104
List<String> scopes = auth.getScopes();
105-
if (scopes == null || scopes.size() != requiredScopes.size())
106-
return false;
107-
108-
return scopes.containsAll(requiredScopes);
105+
return scopes != null && scopes.containsAll(requiredScopes);
109106
}
110107

111108
private Intent createLoginIntent(final AccountAuthenticatorResponse response) {

0 commit comments

Comments
 (0)