Last Updated: January 9, 2026
A typical enterprise employee uses dozens of applications: email, HR systems, project management tools, internal wikis, expense tracking, and more.
Without single sign-on, that employee would need to remember separate credentials for each application and log in to each one individually. This creates friction for users and a nightmare for IT departments managing password resets and access control.
Single Sign-On (SSO) solves this problem. Users authenticate once and gain access to multiple applications without re-entering credentials. When an employee logs in to their corporate identity provider in the morning, they can access Slack, Jira, Salesforce, and internal tools seamlessly.
Single Sign-On (SSO) is an authentication scheme that allows users to access multiple independent applications with a single set of credentials. The user authenticates once, and that authentication is recognized across all connected systems.
The key insight is separation of concerns: instead of every application managing its own authentication, a dedicated identity system handles authentication centrally, and applications trust that system.
Before diving into how SSO works, let us understand the key players.
| Role | Also Known As | Description |
|---|---|---|
| Identity Provider (IdP) | Authorization Server, OP | The system that authenticates users and vouches for their identity |
| Service Provider (SP) | Relying Party, Client | The application that trusts the IdP and relies on it for authentication |
| Principal | User, Subject | The person attempting to access the Service Provider |
The foundation of SSO is trust. Service Providers trust the Identity Provider to correctly authenticate users. This trust is established through:
When an SP receives an authentication assertion from an IdP, it trusts that assertion because:
SSO primarily handles authentication (who is this user?), but it often includes authorization information (what can this user do?).
| Concept | Question Answered | Example |
|---|---|---|
| Authentication | Who is this user? | "This is john.doe@company.com" |
| Authorization | What can they do? | "They belong to Engineering group" |
The IdP authenticates the user and can pass attributes (like group memberships) that SPs use for authorization decisions.
Let us walk through what happens when a user accesses an application in an SSO environment.
The most common flow starts when a user tries to access an application (Service Provider) without an existing session.
Let us break down each step:
The user navigates to . Jira checks for an existing session. Finding none, it needs to authenticate the user.
Jira does not handle authentication itself. Instead, it redirects the user's browser to the Identity Provider (Okta) with an authentication request. This request includes:
The IdP checks if the user already has an active IdP session (maybe they logged into another app earlier). If not, the IdP presents its login page. The user enters credentials and completes MFA. The IdP validates everything and creates an IdP session.
The IdP generates an authentication token containing verified information about the user. This token is sent back to Jira through the user's browser (via redirect or form post).
Jira receives the token and validates it:
If valid, Jira creates its own session for the user and grants access.
Here is where SSO shines. The user now clicks a link to Confluence (another SP):
Because the user already has an active session at the IdP (from logging into Jira), steps 5a-5d are skipped entirely. The user is authenticated to Confluence without entering credentials again.
Two protocols dominate the SSO landscape: SAML and OpenID Connect (OIDC). Understanding when to use each is important for system design.
Security Assertion Markup Language uses XML-based assertions to exchange authentication data.
OpenID Connect is an identity layer built on OAuth 2.0, using JSON-based tokens (JWTs).
| Aspect | SAML 2.0 | OpenID Connect |
|---|---|---|
| Token Format | XML | JWT (JSON) |
| Transport | Browser redirects, POST | Browser redirects, backchannel |
| Mobile Support | Poor | Excellent |
| API Authorization | Separate concern | Built-in (OAuth 2.0) |
| Complexity | Higher | Lower |
| Enterprise Adoption | Very high | Growing |
| Consumer Adoption | Low | Very high |
| Specification Size | Large (multiple docs) | Compact |
Rule of thumb: Use OpenID Connect unless you have a specific reason to use SAML (legacy requirements, enterprise mandates).
SSO involves multiple sessions that must be coordinated. Understanding session lifecycle is critical for security and user experience.
IdP Session: Established when the user authenticates with the Identity Provider. This is the "master" session that enables SSO across applications.
SP Sessions: Each Service Provider maintains its own session. These are created when the user first accesses each SP and the IdP vouches for them.
| Event | IdP Session | SP Sessions |
|---|---|---|
| User logs in | Created | None yet |
| User accesses SP1 | Exists | SP1 session created |
| User accesses SP2 | Exists | SP2 session created |
| IdP session expires | Terminated | May continue (until next auth check) |
| User clicks logout | Terminated | Should be terminated (SLO) |
The IdP session duration affects security and user experience:
| Duration | User Experience | Security |
|---|---|---|
| Short (1 hour) | Frequent re-authentication | Higher security |
| Medium (8 hours) | Re-auth once per workday | Balanced |
| Long (7 days) | Rare re-authentication | Lower security |
Best practice: Use shorter IdP sessions with refresh mechanisms. Require step-up authentication for sensitive operations.
When a user logs out, ideally they should be logged out of all applications. This is Single Logout.
Practical approach: Implement SLO where possible, but design systems to handle partial logout gracefully. Use short SP session durations as a fallback.
Different architectures serve different needs. Choose based on your scale, requirements, and constraints.
A single Identity Provider handles all authentication.
Best for: Small to medium organizations, startups, SaaS platforms.
Multiple IdPs trust each other, allowing users from different organizations to access shared resources.
Best for: B2B applications, partner integrations, consortiums (like higher education).
A central authentication hub sits between users and applications, federating with multiple upstream IdPs.
Best for: Multi-tenant SaaS with enterprise customers, applications supporting both social and enterprise login.
In a microservices architecture, a central authentication service handles SSO while services verify tokens locally.
Best for: Cloud-native applications, microservices architectures.
SSO centralizes authentication, which is powerful but also creates concentrated risk. Security must be thoughtful.
Since SSO provides access to many applications, the authentication at the IdP must be strong.
| Measure | Purpose |
|---|---|
| Multi-Factor Authentication (MFA) | Prevents credential theft from granting access |
| Adaptive Authentication | Increases requirements for unusual behavior |
| Password Policies | Ensures credential strength |
| Account Lockout | Prevents brute force attacks |
| Session Timeout | Limits exposure window |
The tokens exchanged in SSO must be protected:
Signature Validation: Always verify cryptographic signatures. Never trust unsigned tokens.
Audience Validation: Verify the token was meant for your application. A token for App A should not work at App B.
Expiration Enforcement: Reject expired tokens. Do not add excessive clock skew tolerance.
Replay Prevention: Use nonces (OIDC) or track used assertion IDs (SAML) to prevent token reuse.
Transport Security: All SSO traffic must use HTTPS.
| Attack | Description | Mitigation |
|---|---|---|
| Token Theft | Attacker steals valid token | Short token lifetimes, secure storage, HTTPS |
| Session Hijacking | Attacker takes over IdP session | Secure cookies, session binding, MFA |
| Phishing | Fake IdP login page | User education, phishing-resistant MFA |
| Replay Attack | Reusing captured tokens | Nonces, timestamp validation, one-time tokens |
| XML Signature Wrapping | Manipulating SAML XML | Use vetted libraries, strict validation |
| Open Redirect | Redirect to malicious site after auth | Validate redirect URLs strictly |
The Identity Provider becomes a high-value target. Protect it accordingly:
When designing an SSO solution, consider these decisions and trade-offs.
| Approach | Pros | Cons |
|---|---|---|
| Managed IdP (Okta, Auth0, Azure AD) | Quick setup, maintained by experts, compliance certifications | Cost, vendor lock-in, less control |
| Self-Hosted IdP (Keycloak, Gluu) | Full control, customizable, no per-user costs | Operational burden, security responsibility |
| Custom Implementation | Complete flexibility | High risk, significant engineering investment |
Recommendation: Use a managed IdP unless you have specific requirements (air-gapped environments, extreme customization needs) and the expertise to operate identity infrastructure securely.
Login Page Redirect: Users expect to be redirected to a familiar login page. Make sure the IdP login page is branded and trustworthy.
Deep Linking: When users access a specific page before authentication, redirect them back to that page after login, not the home page.
Session Persistence: Decide whether to persist IdP sessions across browser restarts. Longer sessions improve UX but reduce security.
Logout Clarity: Make logout behavior clear. Users should understand whether logging out of one app logs them out everywhere.
IdP Unavailability: What happens when the IdP is down?
Clock Skew: Servers with different clocks cause token validation failures
Token Revocation: How to invalidate a compromised user's access?
Single Sign-On transforms authentication from a per-application concern into a centralized, manageable system. The key concepts to remember:
SSO is foundational to modern application security. Whether you are building a SaaS platform, enterprise application suite, or consumer product with social login, understanding SSO patterns helps you design systems that are both secure and user-friendly.