logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
7.79k stars 383 forks source link

fix(core): issue `organization_id` claim for client credentials #6170

Closed gao-sun closed 4 days ago

gao-sun commented 4 days ago

Summary

getExtraTokenClaimsForOrganizationApiResource does not recognize client credentials grant so the organization_id claim is missing in the token. this pull fixes the issue.

Testing

integration tests added

Checklist

github-actions[bot] commented 4 days ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +276 Bytes

Diff by File |Name|Diff| |---|---| |packages/core/src/oidc/extra-token-claims.ts|:chart_with_upwards_trend: +64 Bytes| |packages/integration-tests/src/tests/api/oidc/client-credentials-grant.test.ts|:chart_with_upwards_trend: +212 Bytes|