Case Study
Re-architected authentication from a monolithic system to a decoupled Identity-as-a-Service platform using Ory Hydra and a custom Remix application, enabling SSO, social login, and identity brokering across a multi-product sports tech suite.
GameDay's product suite had grown organically into four separate applications: GameDay Admin Portal, Registration Forms, the Mobile App, and Passport (competition management). Each had its own authentication system, login pages, and session management. Users had to log in separately to each product, often with different credentials, and there was no way to share identity across the suite.
This created real problems. Users got stuck in infinite password reset loops. There was no central place to manage passwords or enforce security policies. Third-party integrations (NRL ID, FIFA Connect ID, SportAUS Connect) each needed bespoke authentication work. And we had no path to modern features like social login, MFA, or passwordless authentication.
The platform serves millions of end users across Australia, New Zealand, the UK, and Asia-Pacific. Any identity solution needed to work with the existing PostgreSQL user database without forcing a data migration. Downtime or disruption to authentication for millions of users was not an option.
Authentication Architecture
The initial PoC in 2021 used Keycloak as an all-in-one identity solution. I stood up a live Keycloak instance, tested identity brokering, social logins, theming, and user migration. It worked, but as I dug deeper into the production requirements, the limitations became clear.
With millions of end users on an existing PostgreSQL database with legacy schema constraints (including a VARCHAR(10) salt column), we needed direct control over the user store without forcing a migration. Keycloak wants to own the user database or federate it, which would have meant either migrating millions of records or maintaining complex federation plugins.
I made the call to pivot to a separated architecture: Ory Hydra as a lightweight, standards-compliant OAuth2/OIDC engine, paired with a custom Remix application that we fully control.
| Factor | Keycloak | Ory Hydra + Remix |
|---|---|---|
| User database | Wants to own the user store or federate | Keep existing PostgreSQL DB, no migration |
| UI customisation | Limited to Keycloak themes (Keycloakify) | Full control with React/Remix components |
| Business logic | Constrained to Keycloak SPIs | Full control for client-to-app mapping, custom flows |
| Legacy constraints | Needs user migration or federation plugins | Direct integration with existing schema |
| Resource footprint | Heavy JVM, complex realm configuration | Hydra is a single Go binary, lightweight |
| Operational complexity | Upgrades and realm config are complex | Hydra is stateless, Remix is standard Node.js |
The decisive factors: with millions of end users, we needed direct control over the legacy database schema, full control over the authentication UX, and the ability to embed custom business logic without being constrained by Keycloak's extension model. Ory Hydra gave us standards-compliant OAuth2/OIDC without opinions about how authentication should work.
The platform consists of three primary components working together:
A certified, headless OAuth 2.0/OIDC provider deployed as a lightweight Go binary on AWS ECS. Hydra handles the complexities of the OAuth2 protocol: token issuance (JWTs), client management, JWKS endpoints, and consent session tracking. It explicitly does not manage users or authentication UIs. Instead, it delegates login and consent to our custom service via redirect flows.
Infrastructure: deployed on AWS with a private PostgreSQL RDS instance, ALB with separate public (OAuth endpoints at hydra.mygameday.app) and private (admin API at hydra.internal) listeners, secrets managed via AWS Secrets Manager, and health monitoring via /health/ready endpoints.
This is the key architectural insight: in Keycloak, the server itself is the identity broker. In our architecture, the custom Remix application IS the broker. Hydra doesn't know or care how users authenticated. It just sees gdp-iam accepting or rejecting login challenges.
The Remix app handles all user-facing authentication flows: login, consent, registration, password reset, email verification, account management, and magic link/OTP authentication. It uses Passport.js with pluggable strategies for each authentication method:
Adding a new identity provider is as simple as adding a new Passport strategy. No changes to Hydra, no changes to any downstream application.
Once the platform went live, existing applications were completely decoupled from authentication. Each app became a "Resource Server" that validates JWTs issued by Hydra. Protected routes check for a valid access token. If it's missing or invalid, the user gets redirected into the Hydra authentication flow. All old login form code, password hashing, and session management was removed from these applications.
The SSO experience: a user logs into the Admin Portal and is automatically authenticated when they navigate to Registration Forms, Passport, or the Mobile App. No second login prompt. Trusted first-party applications skip the consent screen entirely, with the Remix app auto-accepting consent for configured client IDs.
One of the hardest constraints was migrating millions of users without downtime. We implemented an on-demand migration technique: when a user logs in for the first time through the new system, the Remix app authenticates them against the existing database, creates their session in the new auth platform, and seamlessly transitions them. Users who haven't logged in yet remain in the legacy system until they do.
This meant zero bulk migration, zero downtime, and zero user-facing disruption. The migration happens invisibly, one user at a time, driven by natural login activity.
Users log in once and access all four products (Admin, Rego Forms, Passport, Mobile App) without re-authenticating.
On-demand migration technique means millions of existing users transition seamlessly without bulk data moves or downtime.
New identity providers (NRL ID, FIFA Connect, social logins) added by dropping in a Passport.js strategy. No core changes needed.
Custom login pages that dynamically brand per client application. Conditional UI elements (signup buttons, social logins) based on context.
Centralised password policies, MFA support, email verification flows, and passwordless authentication options (magic links, OTP).
Enabled "Login with GameDay" for external partners: SportAUS Connect, etrainu, BigCommerce, WordPress integrations.
I design and implement SSO, OAuth2/OIDC, and identity brokering solutions for multi-product platforms.
Let's Talk