openauth-oidc
OIDC relying-party helpers for OpenAuth-RS.
What It Is
openauth-oidc is for OpenAuth acting as a client of external OpenID Connect
identity providers such as Okta, Microsoft Entra ID, Auth0, Google Workspace,
or Keycloak.
It is not an OAuth/OIDC authorization server. If you want your OpenAuth
application to issue OAuth access tokens, ID tokens, discovery metadata, JWKS,
userinfo, or client credentials, use openauth-oauth-provider instead.
What It Provides
- OIDC provider configuration types.
- Discovery URL calculation and discovery document fetching with a
caller-supplied
reqwest::Client(so the relying party owns SSRF hardening, timeouts, and proxy configuration). - Runtime discovery for partially stored provider configs.
- Endpoint origin validation for issuer, authorization, token, userinfo, JWKS, revocation, introspection, and end-session endpoints.
- Redirect URI construction for the enterprise SSO callback flow.
This crate intentionally has no SAML, XML signature, XML encryption, samael,
openssl, or xmlsec dependency surface.
Quick Start
use ;
// Discovery, JWKS, and token requests are issued with a caller-supplied
// `reqwest::Client`, so the relying party controls timeouts, proxies, and SSRF
// hardening. Production callers should pass an SSRF-guarded client (the
// `openauth-sso` plugin wires one in automatically and blocks private/internal
// IPs by default).
let http_client = new;
let discovered = discover_oidc_config
.await?;
let config = OidcConfig ;
;
let redirect_uri = oidc_redirect_uri;
# let _ = ;
# Ok::
Most applications do not wire this crate directly. Use openauth-sso when you
want the full enterprise SSO plugin with provider storage, login routes, domain
verification, and account linking.
How It Fits
openauth-oidc: low-level relying-party config, discovery, and redirect helpers.openauth-sso: OpenAuth plugin that uses this crate to consume external OIDC IdPs.openauth-oauth-provider: OpenAuth plugin that turns your app into an OAuth/OIDC provider.
Status
Experimental beta. Discovery, validation, and configuration types are usable, but public API details may change before stable release.
Better Auth compatibility
Server-side OIDC relying-party helpers for external identity providers. Aligned with Better Auth 1.6.9 where it matters; OpenAuth is not a line-by-line port. For route-level parity, test counts, differences, and gaps, see UPSTREAM.md.