Skip to content

Commit f4bd20f

Browse files
committed
Update scopes page to warn admin when offline scope is the only selected scope
1 parent 60fd09c commit f4bd20f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/web/src/app/(app)/settings/workspaceAskAgent/workspaceAskAgentPage.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ function OAuthScopesInput({
9090
const [oauthScopeSearchInput, setOAuthScopeSearchInput] = useState("");
9191
const selectedOAuthScopeSet = new Set(selectedOAuthScopes);
9292
const requestedOAuthScopes = getMcpRequestedOAuthScopes(selectedOAuthScopes, customOAuthScopeInput);
93+
const isOfflineAccessOnly = requestedOAuthScopes.length === 1
94+
&& requestedOAuthScopes[0] === OFFLINE_ACCESS_SCOPE
95+
&& discoveredOAuthScopes.some((scope) => scope !== OFFLINE_ACCESS_SCOPE);
9396
const filteredOAuthScopes = useMemo(() => {
9497
const query = oauthScopeSearchInput.trim().toLowerCase();
9598
if (!query) {
@@ -201,6 +204,13 @@ function OAuthScopesInput({
201204
className="min-h-20 resize-y font-mono text-sm"
202205
/>
203206
</div>
207+
208+
{isOfflineAccessOnly && (
209+
<p className="flex items-start gap-1.5 text-xs text-muted-foreground">
210+
<AlertTriangleIcon className="h-3.5 w-3.5 shrink-0 text-yellow-600 dark:text-yellow-400" />
211+
Only offline_access is selected. Without any resource scopes, the connector may not be able to access anything.
212+
</p>
213+
)}
204214
</div>
205215
);
206216
}

0 commit comments

Comments
 (0)