Skip to content

feat: generic OIDC auth — discover token endpoint, support audience#3

Merged
SamoKopecky merged 2 commits into
mainfrom
feat/generic-oidc
Jun 14, 2026
Merged

feat: generic OIDC auth — discover token endpoint, support audience#3
SamoKopecky merged 2 commits into
mainfrom
feat/generic-oidc

Conversation

@SamoKopecky

Copy link
Copy Markdown
Member

The SDK no longer hardcodes Zitadel's /oauth/v2/token path. It discovers the token_endpoint from the provider's /.well-known/openid-configuration, so it works with any OIDC-compliant IdP (Zitadel, Keycloak, Okta, Auth0, ...).

  • auth: discover token_endpoint via OIDC discovery; add optional audience (sent as the token-request audience param) and scope so the issued token's aud can match the backend's verified OIDC_AUDIENCE.
  • models: add OpenIDConfiguration; make TokenResponse.id_token optional (not all providers return one for client_credentials).
  • client: expose audience / scope passthrough.
  • tests: cover endpoint discovery + audience sent/omitted; update mocks for the discovery hop.

Samuel Kopecky and others added 2 commits June 14, 2026 10:49
The SDK no longer hardcodes Zitadel's /oauth/v2/token path. It discovers the
token_endpoint from the provider's /.well-known/openid-configuration, so it
works with any OIDC-compliant IdP (Zitadel, Keycloak, Okta, Auth0, ...).

- auth: discover token_endpoint via OIDC discovery; add optional `audience`
  (sent as the token-request `audience` param) and `scope` so the issued
  token's `aud` can match the backend's verified OIDC_AUDIENCE.
- models: add OpenIDConfiguration; make TokenResponse.id_token optional
  (not all providers return one for client_credentials).
- client: expose `audience` / `scope` passthrough.
- tests: cover endpoint discovery + audience sent/omitted; update mocks for
  the discovery hop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SamoKopecky SamoKopecky merged commit eddbfa5 into main Jun 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant