3 Pitfalls of Multi-Portal Authentication with Keycloak [Part 5]
The Setup Saru has 4 portals: System, Provider, Reseller, Consumer. Each runs on a different subdomain, but they share one Keycloak realm. system.saru.local (port 3001) → Keycloak provider.saru.local (port 3002) → (single realm, reseller.saru.local (port 3003) → 4 clients) consumer.saru.local (port 3004) → Basic Keycloak + Auth.js integration is well-documented in existing tutorials. This article covers the problems those tutorials don’t mention. Pitfall 1: Cookie Collision Across Subdomains The Problem We wanted cross-subdomain session sharing for potential future use, so we set: ...