diff --git a/client/src/api/client.ts b/client/src/api/client.ts index c8801411..3147e5c2 100644 --- a/client/src/api/client.ts +++ b/client/src/api/client.ts @@ -143,6 +143,7 @@ export const oauthApi = { state?: string code_challenge: string code_challenge_method: string + resource?: string }) => apiClient.get('/oauth/authorize/validate', { params }).then(r => r.data), /** Submit user consent (approve or deny) */ @@ -154,6 +155,7 @@ export const oauthApi = { code_challenge: string code_challenge_method: string approved: boolean + resource?: string }) => apiClient.post('/oauth/authorize', body).then(r => r.data), clients: { diff --git a/client/src/pages/OAuthAuthorizePage.tsx b/client/src/pages/OAuthAuthorizePage.tsx index f0a09df7..b1cd5b3e 100644 --- a/client/src/pages/OAuthAuthorizePage.tsx +++ b/client/src/pages/OAuthAuthorizePage.tsx @@ -34,6 +34,7 @@ export default function OAuthAuthorizePage(): React.ReactElement { const state = params.get('state') || '' const codeChallenge = params.get('code_challenge') || '' const ccMethod = params.get('code_challenge_method') || '' + const resource = params.get('resource') || undefined // Load auth state once, then validate useEffect(() => { @@ -57,6 +58,7 @@ export default function OAuthAuthorizePage(): React.ReactElement { code_challenge: codeChallenge, code_challenge_method: ccMethod, response_type: 'code', + resource, }) setValidation(result) @@ -99,6 +101,7 @@ export default function OAuthAuthorizePage(): React.ReactElement { code_challenge: codeChallenge, code_challenge_method: ccMethod, approved, + resource, }) setPageState('done') window.location.href = result.redirect