
Every homegrown auth starts as a handful of lines. The trouble starts after launch, when each small decision quietly hardens into the model your whole product assumes is true.
Email, password, hash it, store it, compare on login. Clean and done.
Who counts as a user. Which organization they belong to. Which session is still trustworthy. How access gets pulled back.
Swapping the login page on paper meant rebuilding the identity foundation in code.
It logs people in for years without an incident. Then one business change turns “enough” into “in the way” overnight. These three arrive for almost every product that scales.

The first big deal lands and procurement wants SSO through their own Entra or Google Workspace. Then both SAML and OIDC, because the next customer runs something else. Every customer’s identity setup is different, and almost none of the work carries over.

Split by organization, split by product, often inherited through acquisitions. “Unify identity” sounds like a feature; in code it means redefining what counts as one user and one organization.

It’s no longer just people in a browser. Agents, MCP servers, and command lines all claim to act for some user. And your auth only knows how to log a person into a page.

The first version is cheap: a few engineers, a few weeks, out the door. Then you feed it every year with the engineering time that belonged in your core product.
You never get an invoice that says “authentication.”
The critical context lives in someone’s head, not the docs.
No customer pays you a cent more because you wrote your own OAuth server.
Most mature auth already covers the features: SSO, MFA, organizations, unified login, agent access. The real difference is whether you can leave. Don’t climb out of your own few thousand lines just to get locked into someone else’s.
Logto is open source, self-hostable, and also offered as a managed Cloud. Sign-in, MFA, SSO, and RBAC work out of the box on standard OIDC. Billing follows tokens, and the day you want to move out, the door stays open.