Skip to content

Commit b294cf0

Browse files
committed
clean up comments to be more concise
1 parent 6d5dd9f commit b294cf0

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

packages/web/src/ee/features/chat/mcp/oauthScopeUtils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export function buildMcpOAuthScopeEntries({
5454

5555
return normalizedAvailableOAuthScopes.map((scope) => ({
5656
scope,
57-
// offline_access is enabled by default because all clients declare the refresh_token
58-
// grant; an admin who leaves it unticked would produce a broken authorization request.
57+
// Force-enabled regardless of admin selection — see OFFLINE_ACCESS_SCOPE.
5958
enabled: scope === OFFLINE_ACCESS_SCOPE || requestedScopeSet.has(scope),
6059
}));
6160
}

packages/web/src/ee/features/chat/mcp/prismaOAuthClientProvider.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,10 @@ export class PrismaOAuthClientProvider implements OAuthClientProvider {
113113
this.userId = userId;
114114
this.callbackUrl = callbackUrl;
115115
this.callbackReturnTo = callbackReturnTo;
116-
// offline_access is always injected because every client declares the refresh_token grant
117-
// and providers such as Atlassian reject /authorize when the grant is declared but
118-
// offline_access is absent. We inject unconditionally rather than checking the provider's
119-
// advertised scopes because oauthScopesSupported is not plumbed through to this constructor;
120-
// the tradeoff (a benign unknown-scope rejection on strict providers) is the same as the
121-
// existing behaviour of always declaring refresh_token.
116+
// Always inject offline_access (see OFFLINE_ACCESS_SCOPE). We do so unconditionally rather
117+
// than checking the provider's advertised scopes because oauthScopesSupported is not plumbed
118+
// through to this constructor; the tradeoff (a benign unknown-scope rejection on strict
119+
// providers) is the same as the existing behaviour of always declaring refresh_token.
122120
this.requestedOAuthScopes = normalizeMcpRequestedOAuthScopes([
123121
...requestedOAuthScopes,
124122
OFFLINE_ACCESS_SCOPE,

0 commit comments

Comments
 (0)