setScopes method
Sets the scopes which are used for issuing a new token.
If newScopes
is NOT equals scopes both tokens are invalidated
(doesn't mind the order of the scopes).
Implementation
@override
void setScopes(List<String> newScopes) {
bool needReset = newScopes.length != scopes.length;
if (!needReset) {
for (final String scope in newScopes) {
needReset = !scopes.contains(scope);
if (needReset) break;
}
}
if (needReset) {
scopes = newScopes;
_invalidateLoginState();
}
}