Comparisons
Both provide single sign-on, but not with the same tools. Here are the differences that matter when choosing.
SAML is the historical standard for enterprise applications: XML, signed assertions, browser only. OpenID Connect (OIDC) is more recent: JSON, JWT tokens, APIs, mobile and modern web applications.
| SAML 2.0 | OpenID Connect | |
|---|---|---|
| Format | XML (signed assertion) | JSON (JWT ID token) |
| Transport | Redirect or POST in the browser | Redirect then direct HTTP calls (token, userinfo) |
| Mobile applications and APIs | Poorly suited | Designed for it |
| Discovery | XML metadata to exchange | The .well-known/openid-configuration document |
| Logout | SLO, often fragile | RP-initiated logout, back-channel |
| Typical use | Enterprise applications (SaaS, intranet) | Web, mobile applications, APIs |
| Implementation difficulty | XML signatures, certificates, clocks | Redirect URI, scopes, PKCE |