Back to stack index

Auth

Ory

Open identity stack for self-hosted SaaS-style apps.

Short answer

Ory is an open-source identity platform made of separate components: Kratos for user login and registration, Hydra for OAuth2 and OpenID Connect, Keto for permissions and Oathkeeper as an access proxy. The open-source components are licensed under Apache 2.0. Ory Kratos and Hydra v26.2.0 were released on March 20, 2026; since October 2025 Ory uses calendar versioning in the form year, quarter, number. Ory Network, the hosted service, has a free Developer plan, a Production plan at $770 a year and a Growth plan at $9,350 a year, each with included usage and per-user charges above it, plus custom Enterprise pricing. In June 2026 Ory Network added per-organization session-lifetime overrides. AI apps need identity for user login, team SSO for business customers and, increasingly, OAuth for MCP servers and AI agents acting on behalf of users. Other open-source options in our directory are Keycloak, authentik, ZITADEL, SuperTokens and Logto.

Latest OSS releases
Ory Kratos and Hydra v26.2.0, March 20, 2026
Ory GitHub
License
Apache 2.0 (OSS); Ory Enterprise License for enterprise builds
Ory docs
Ory Network pricing
Developer free; Production $770/yr; Growth $9,350/yr; Enterprise custom
ory.sh/pricing
Directory projects
Ory, Keycloak, authentik, ZITADEL, SuperTokens, Logto
Project repositories

Updated October 21, 2026How we evaluate tools

Official site

Directory projects (6)

  • Ory

    Ory authenticates users with OIDC, SSO, or passkeys on identity servers you run.

  • Keycloak

    Keycloak authenticates users with OIDC, SSO, or passkeys on identity servers you run.

  • Authentik

    Authentik authenticates users with OIDC, SSO, or passkeys on identity servers you run.

  • Zitadel

    Zitadel authenticates users with OIDC, SSO, or passkeys on identity servers you run.

  • SuperTokens

    SuperTokens authenticates users with OIDC, SSO, or passkeys on identity servers you run.

  • Logto

    Logto authenticates users with OIDC, SSO, or passkeys on identity servers you run.

Ory and open-source identity for AI apps: Ory, Keycloak, authentik, ZITADEL, SuperTokens and Logto compared in 2026

Why AI apps need identity work

Every AI app needs user login, and most need more than that:

NeedExample
User loginEmail, passkeys, Google and GitHub sign-in
Multi-factor authenticationProtect accounts with stored conversations and paid credits
Enterprise SSOBusiness customers want SAML or OIDC through Okta or Microsoft Entra ID
Organizations and rolesTeams sharing workspaces, admins managing members
API keys and service tokensCustomers calling your AI API from their code
OAuth for third partiesMCP clients and AI agents acting on a user's behalf
Fine-grained permissionsWhich documents an AI assistant may retrieve for a given user

Building these yourself is slow and risky. Open-source identity tools give you a tested base you can self-host.

Which directory projects fit here

ProjectWhat it isLicenseWritten in
OryModular, API-first identity componentsApache 2.0Go
KeycloakFull identity and access management server, a CNCF projectApache 2.0Java
authentikIdentity provider with flows, SSO and proxy authenticationMIT core with enterprise featuresPython and Go
ZITADELIdentity platform built for multi-tenant SaaSAGPLv3Go
SuperTokensAuth for app developers with prebuilt UI and SDKsApache 2.0 coreJava core, many SDKs
LogtoAuth and OIDC provider with organizations and SSOMPL 2.0TypeScript

Ory components

ComponentPurpose
KratosIdentity and user management: registration, login, MFA, passkeys, recovery, verification
HydraOAuth2 and OpenID Connect provider, certified by the OpenID Foundation
KetoPermissions based on Google's Zanzibar model
OathkeeperIdentity and access proxy that checks requests before they reach your services
PolisEnterprise SSO bridge for SAML, originally BoxyHQ's Jackson

Ory does not ship a fixed login screen. Your app renders the forms using Ory's flow APIs, or uses Ory Elements, a set of prebuilt UI components. That gives full control over branding at the cost of some front-end work.

Versioning and 2026 releases

From October 2025, Ory moved all components to calendar versioning in the form YY.Q.N. Kratos and Hydra v26.2.0 were released on March 20, 2026. Ory Network runs newer builds continuously; its June 2026 changelog added per-organization session-lifetime overrides, so a business customer can require shorter sessions for its members than your default.

Ory Network pricing

PlanPriceUsage beyond credit
DeveloperFreeDevelopment use
Production$770/year, or $21 included monthly usage credit$0.14 per average daily active user per month; $0.007 per M2M token; $0.00009 per permission check
Growth$9,350/year, or $255 included monthly usage credit$0.12 per aDAU per month; $0.006 per M2M token; $0.000085 per permission check
EnterpriseCustomCustom

Self-hosted open-source components are free. The Ory Enterprise License adds enterprise features and support for teams running Ory in their own infrastructure.

Identity for MCP servers and AI agents

Remote MCP servers expose tools such as "read my calendar" or "create an invoice" to AI assistants. The MCP specification uses OAuth 2.1 for this:

  1. The AI client discovers the MCP server's authorization server from metadata.
  2. The client registers itself, often through dynamic client registration.
  3. The user signs in and consents to the requested scopes.
  4. The authorization server issues an access token for that MCP server only.
  5. The MCP server validates the token and checks scopes before running tools.

Ory Hydra, Keycloak, ZITADEL and Logto can act as the authorization server. Keep tokens short-lived, use narrow scopes such as calendar.read, and require fresh consent for sensitive tools. See the MCP stack page.

Agents acting for users raise another question: which permissions an agent inherits. A good practice is to issue tokens tied to both the user and the agent client, so logs show which agent acted and users can revoke one agent without signing out everywhere.

Permissions for retrieval

When an AI assistant searches a company's documents, it must return only what the asking user may see. Permission systems based on the Zanzibar model, such as Ory Keto, store relationships like "user A is a member of team B, which can view folder C". At query time, the retrieval service filters candidate documents by checking permissions, or pre-filters by the list of folders the user can access. Without this step, an assistant can leak confidential documents across teams.

Comparing the options

NeedGood fit
Full control over login UI, API-firstOry
Mature, feature-rich IAM for many internal appsKeycloak
SSO for self-hosted tools plus proxy auth for apps without loginauthentik
Multi-tenant B2B SaaS with organizationsZITADEL or Logto
Quick auth in a new app with prebuilt screensSuperTokens or Logto
Fine-grained permissionsOry Keto, or OpenFGA and SpiceDB outside the directory

Self-hosting tips

  • Run identity services with a managed PostgreSQL database and regular backups; losing identity data locks everyone out.
  • Put services behind TLS and keep admin APIs on a private network.
  • Rotate signing keys on a schedule and support key rollover.
  • Turn on rate limiting for login and recovery endpoints to slow credential stuffing.
  • Subscribe to security advisories for whichever tool you choose and patch promptly.
  • Test account recovery flows, since they are a common attack target.

Hosted alternatives

Hosted services such as Clerk, Auth0, WorkOS, Stytch, Supabase Auth and Firebase Authentication remove operations work. Ory Network, ZITADEL Cloud, Logto Cloud and SuperTokens' managed service give a hosted option with an open-source exit path, so you can move to self-hosting later without rebuilding login. That exit path is the main reason many teams start with an open-source-backed provider even when they use its cloud.

A typical setup for an AI SaaS

  1. Kratos, or Logto, for sign-up with email, passkeys and Google sign-in.
  2. Organizations with roles stored in your database or the identity tool.
  3. SAML or OIDC SSO for enterprise customers through Ory Polis or the provider's SSO feature.
  4. Hashed API keys for customers who call your AI API, with per-key usage limits.
  5. Hydra as the OAuth server for your remote MCP server.
  6. Audit logs of sign-ins, key creation and agent token grants.

Related: MCP stack, Go stack, PostgreSQL stack, Django stack, Kubernetes stack, Stack index.

Frequently asked questions

What is the difference between Ory Kratos and Ory Hydra?

Kratos manages users: registration, login, passwords, passkeys, social sign-in, multi-factor authentication, account recovery and profile settings. Hydra is an OAuth2 and OpenID Connect server that issues tokens to applications. Use Kratos for your own app's login; add Hydra when other apps, APIs or AI agents need OAuth tokens to act for your users.

How much does Ory Network cost?

The Developer plan is free. Production costs $770 a year, or a $21 monthly included usage credit, then $0.14 per average daily active user per month, $0.007 per machine-to-machine token and $0.00009 per permission check. Growth costs $9,350 a year with a $255 monthly credit and lower unit prices. Enterprise is custom.

Can I self-host Ory for free?

Yes. Kratos, Hydra, Keto and Oathkeeper are Apache 2.0 and free to run. You pay for infrastructure and run them yourself. The Ory Enterprise License, priced on request, adds enterprise features and support for self-hosted production.

Which open-source identity tool is easiest to start with?

Logto and SuperTokens are quick to add to a new app, with SDKs and prebuilt login screens. authentik and Keycloak are full identity providers with admin interfaces, suited to SSO across many internal apps. ZITADEL suits multi-tenant SaaS. Ory is the most modular and API-first, which suits teams that want full control over the login interface.

How do MCP servers handle authentication?

The MCP specification uses OAuth 2.1 for remote servers. The MCP server acts as a resource server, and an authorization server, which can be Ory Hydra, Keycloak, ZITADEL, Logto or a hosted provider, issues tokens after the user consents. Dynamic client registration lets AI clients register themselves without manual setup.

Sources

  1. Ory Kratos releases
  2. Ory Network pricing
  3. Ory changelog
  4. MCP authorization specification