Three protocols dominate enterprise and consumer authentication in 2026: OAuth 2.0, SAML 2.0, and OpenID Connect (OIDC). They solve related but distinct problems, and teams often mischoose by treating them as interchangeable.
OAuth 2.0 is an authorization framework, not an authentication protocol. It answers "can this app access this resource on the user's behalf?" — not "who is this user?" OAuth 2.0 is the foundation for third-party API access: your app getting a GitHub token to read a user's repos, or a Slack bot posting to a channel. The token-based flow (authorization code, client credentials, device flow) is HTTP-native and works in any client. If you're building an API that third-party apps will access, OAuth 2.0 is the answer.
OpenID Connect is OAuth 2.0 with an identity layer on top. It adds the ID token (a signed JWT containing user identity claims) to OAuth's access token. OIDC answers "who is this user?" in addition to "is this app authorized?" Google Sign-In, Apple Sign-In, and most modern SSO products are OIDC. For consumer apps, mobile apps, and SPAs needing both identity and delegated access, OIDC is the right choice. Libraries like Auth.js (formerly NextAuth), Passport.js, and Keycloak handle OIDC flows so you don't implement them by hand.
SAML 2.0 is XML-based, browser-redirect-heavy, and designed for enterprise identity federation between organizations. It predates REST APIs. SAML is what your company's Okta or Azure AD installation uses to let employees log into Salesforce, Workday, or any enterprise SaaS. If you're building a B2B SaaS product targeting enterprise customers, you will need SAML support — procurement teams at large companies require it. SAML is painful to implement (XML canonicalization, signature validation, replay attack prevention) and libraries like python3-saml or OneLogin's Ruby SAML kit are essentially required.
Practical mapping: consumer app with social login → OIDC. API accessed by third-party apps → OAuth 2.0. Enterprise B2B SaaS → SAML (and OIDC as the modern alternative for customers who accept it). Internal workforce SSO → OIDC or SAML depending on your IdP. Many B2B products support both OIDC and SAML to cover the full enterprise buyer spectrum.