Keycloak authentication like GitHub

i am looking for help how t setup authentication like Github using keycloak.

i am using Kong API gateway with keycloak along with OIDC plugin.

as in GitHub we have organization repo and each user has different access in an organisation repo (read/write) or i can add a specific user to the organisation with only one repository access.

i think Github manage this by forming URL and restricting user at API gateway level if no access there.

can someone please help me how to achieve it using same with keyclaok and kong API gateway.