From 32ee3fc9d85b187187ece93f800aaf7697d8a327 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 8 Jul 2026 13:04:45 +0530 Subject: [PATCH] (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. --- src/routes/(public)/oauth2/consent/+page.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/(public)/oauth2/consent/+page.svelte b/src/routes/(public)/oauth2/consent/+page.svelte index b44d8e8b8..f12d12cfd 100644 --- a/src/routes/(public)/oauth2/consent/+page.svelte +++ b/src/routes/(public)/oauth2/consent/+page.svelte @@ -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);