bool isRefreshTokenScopeAlias(String scope) { final normalized = scope.trim().toLowerCase(); return normalized == 'offline' || normalized == 'offline_access'; } List filterConsentScopes(Iterable scopes) { return scopes .map((scope) => scope.trim()) .where((scope) => scope.isNotEmpty && !isRefreshTokenScopeAlias(scope)) .toList(growable: false); }