(fix): forward all resource values in the authenticated authorize path

Greptile follow-up: the PAR path already used params.getAll('resource') but the authenticated direct-authorize call still sent only the first value, dropping repeated RFC 8707 resource indicators.
This commit is contained in:
Chirag Aggarwal committed 2026-07-08 13:04:45 +05:30
1 parent 4afe9de76d
commit 32ee3fc9d8
1 file changed
+5 -1
@@ -234,6 +234,7 @@
// existing approved identity) via the SDK, then render consent or
// redirect.
try {
const resources = params.getAll('resource');
const result = await sdk.forConsole.oauth2.authorize({
clientId,
redirectUri: params.get('redirect_uri') ?? '',
@@ -246,7 +247,10 @@
prompt: params.get('prompt') ?? undefined,
maxAge: parseMaxAge(params.get('max_age')),
authorizationDetails: params.get('authorization_details') ?? undefined,
resource: params.get('resource') ?? undefined
// SDK types `resource` as string; the server accepts
// a URI list (RFC 8707).
resource:
resources.length > 0 ? (resources as unknown as string) : undefined
});
if (cancelled) return;
await handleAuthorizeResult(result, loggedInAccount, clientId, false);