Skip to content

Cross-Domain SSO

Cross-Domain Single Sign-On (SSO) is the architectural solution to the fundamental browser security constraint known as the “Same-Origin Policy.” In a modern enterprise ecosystem where applications are distributed across multiple top-level domains (e.g., company.com, partner-portal.io, and service-app.net), the challenge is to maintain a unified user session without requiring the user to re-authenticate at every boundary. Cross-Domain SSO moves beyond simple cookie sharing, utilizing secure token exchange and redirect handshakes to “Bridge” the session context. By implementing these patterns, organizations can create a cohesive user experience that feels like a single, integrated platform, even when the underlying infrastructure is globally distributed.

CROSS-DOMAIN

Session Bridging
Core Mission
Sovereign Boundary Navigation. Establishing a secure mechanism to transfer identity and session state between isolated browser origins without compromising security or user privacy.
Like the Security Diplomatic Escort: Imagine you are a VIP visiting a secure complex with multiple detached buildings (The Domains). Each building has its own guard who doesn't recognize the other buildings' badges. Instead of you getting a new badge at every door, a "Diplomatic Escort" (The SSO Service) meets you at the first building. They verify you once, and then they walk you to each subsequent building. The guards let you in because they recognize and trust the escort, even though they've never seen you before. The escort is the "Bridge" that makes the whole complex accessible.
Multi-Brand Ecosystems / Enterprise Portals / Hybrid Cloud Access

Choosing a cross-domain pattern depends on your tolerance for browser-dependency and the level of centralization in your identity stack.

PatternMechanismStrategic ValueBrowser Limitation
Token ExchangeShort-lived bridge tokens.Highest Security.Resistant to 3rd-party cookie bans.
Redirect HandshakeOIDC/SAML redirects.Most Interoperable.Standardized across all vendors.
Session BridgingCentralized session store.High Performance.Requires shared backend (Redis).
Iframe/PostMessageCross-frame communication.Lowest Friction.Failing due to modern cookie policies.

Establishing a session on a new domain requires a “Identity Bridge” that transfers the user’s context through the browser.

sequenceDiagram
    participant User
    participant Source as Source Domain (A.com)
    participant IDP as Identity Provider
    participant Target as Target Domain (B.com)
    
    User->>Source: Active Session Exists
    User->>Source: Click "Go to App B"
    Source->>IDP: Request Bridge Token for B.com
    IDP-->>Source: Issue Short-lived Token
    Source-->>User: Redirect to B.com?token=XYZ
    User->>Target: Deliver Token
    Target->>IDP: Validate Token XYZ
    IDP-->>Target: Return User Identity
    Target->>Target: Establish B.com Session
    Target-->>User: Grant Access to App B
1

Identify & Bridge

The source domain identifies that the user wants to navigate to a sister domain. It requests a "Bridge Token" from the central Identity Provider. This token is cryptographically bound to both the user and the specific target domain, preventing it from being reused elsewhere.

2

Transition the Context

The user's browser is redirected to the target domain, carrying the Bridge Token as a query parameter or a POST body. This transition is usually seamless and happens in a fraction of a second, appearing to the user as a simple page load.

3

Validate & Re-hydrate

The target domain receives the token and performs a back-channel validation with the IdP. Once the token is verified, the target domain "Re-hydrates" the user's session—creating local cookies and establishing a security context identical to the source domain.


A robust bridge requires a secure token management service on the backend to prevent replay attacks.

# Generating a secure bridge token for cross-domain navigation
def generate_bridge_token(user_id, target_domain):
token_payload = {
"sub": user_id,
"aud": target_domain,
"iat": now(),
"exp": now() + 60, # Extremely short-lived
"jti": generate_nonce()
}
return jwt.encode(token_payload, PRIVATE_KEY, algorithm="RS256")

Master the technical mechanics of cross-domain identity and enterprise collaboration.