Single Sign-On (SSO) is an authentication process where 1 single set of credentials gives access to many apps or sites. That way the user doesn't have to log into each one separately. The credentials are stored and managed by a central system, the identity provider (IdP). It's widely used in companies, where an employee uses, for example, 15 internal apps. It's like an all-inclusive resort wristband: you show it at the restaurant, the pool and the bar, without paying at each place.
The SSO flow goes like this. The user requests a resource from the app they want to use. The app redirects them to the identity provider to authenticate. The user logs in with their credentials, usually username and password. The IdP sends an SSO response back to the app. The app grants access. If they then open another app, the IdP already knows who they are and doesn't ask for the password again. It's like airport security: you go through it 1 time and then walk to any of the 30 gates without going through again.
SSO has advantages: 1 single set of credentials to remember, easy access, better security and compliance, and lower support and admin costs. It also has disadvantages: if the main password is stolen, all apps fall at once; and it's a bit slower, because each app checks with the SSO provider. Common IdPs are Okta, Google, Auth0 and OneLogin. It's like a master key: it opens all 20 doors, which is why losing it is serious.
SSO has 3 pieces. The identity provider (IdP) stores identities, authenticates the user and grants access to the service provider. The service provider is the app the user wants to use: it trusts the IdP to know who they are, though it may keep its own user data. The identity broker is an intermediary that connects several service providers with several IdPs, whatever protocol each one uses. It's like a country, its hotels and a translator: the country issues the passport, hotels trust it, and the translator helps across different languages.
SAML (Security Assertion Markup Language) is an open standard for sharing security information, like identity, authentication and permissions, across different systems. It uses XML for its messages. It enables identity federation: an IdP securely passing authenticated identities and their attributes to service providers. Version 2.0 has existed since 2005. It's like a signed recommendation letter: another company accepts it because it trusts whoever signed it.
SAML uses XML and targets large-enterprise security; OAuth and OIDC use JSON and are simpler. OAuth and OIDC rely heavily on REST, which is why they fit mobile and modern web apps better. SAML drops a session cookie in the browser, good for short-lived work. OIDC is implemented quickly with free libraries in every language; SAML is complex to install and maintain. It's like a formal sealed letter versus a text message: both work, but one is heavier.