Ory Hydra — Open-Source OAuth 2.0 and OpenID Connect Server
Ory Hydra is a hardened, certified OAuth 2.0 and OpenID Connect provider that handles token issuance and consent flows while letting you own user management and login UI.
Installation agent prête
Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.
npx -y tokrepo@latest install c948e459-3942-11f1-9bc6-00163e2b0d79 --target codexÀ exécuter après confirmation du plan en dry-run.
What it is
Ory Hydra is a hardened, OpenID Foundation-certified OAuth 2.0 and OpenID Connect provider written in Go. Unlike full identity platforms like Keycloak or Auth0, Hydra focuses exclusively on the OAuth/OIDC protocol layer: token issuance, consent flows, client management, and token introspection. It deliberately does not include user management or login UI, letting you bring your own.
It targets teams that need standards-compliant OAuth 2.0 infrastructure but want to keep control over their user database, login experience, and registration flows.
How it saves time or tokens
Implementing OAuth 2.0 correctly from scratch is a multi-month effort with significant security risk. Hydra provides a certified, battle-tested implementation that handles the hard parts (token lifecycle, PKCE, consent management, token revocation) while integrating with your existing user store. You write the login UI and user lookup; Hydra handles everything else.
How to use
- Deploy Hydra using Docker or the binary release. Configure it with a PostgreSQL or MySQL database for persistence.
- Register OAuth 2.0 clients with
hydra create client --grant-type authorization_code --response-type code. - Implement two endpoints in your application: a login endpoint and a consent endpoint. Hydra redirects users to these during the OAuth flow.
Example
# Start Hydra with Docker
docker run -d --name hydra \
-p 4444:4444 -p 4445:4445 \
-e DSN='postgres://hydra:secret@db:5432/hydra?sslmode=disable' \
-e URLS_SELF_ISSUER='https://auth.example.com/' \
-e URLS_LOGIN='https://app.example.com/login' \
-e URLS_CONSENT='https://app.example.com/consent' \
oryd/hydra serve all
# Create an OAuth 2.0 client
hydra create client \
--endpoint http://localhost:4445 \
--grant-type authorization_code \
--response-type code \
--scope openid,offline \
--redirect-uri https://app.example.com/callback
Related on TokRepo
- Security tools — Authentication and authorization solutions
- Self-hosted tools — Run your own identity infrastructure
Common pitfalls
- Hydra does not include user management. You must build or integrate a separate user store and login UI. This is by design but surprises teams expecting a full IdP.
- The admin API (port 4445) must never be exposed to the internet. It allows client creation and token management without authentication.
- Database migrations must run before starting a new Hydra version. Skipping migrations causes runtime errors.
Questions fréquentes
Keycloak is a full identity provider with built-in user management, login pages, admin console, and social login. Hydra handles only the OAuth 2.0/OIDC protocol layer and delegates user management to your application. Hydra is lighter and more flexible; Keycloak is more turnkey.
Yes. Hydra is OpenID Foundation certified for OpenID Connect. It passes the official conformance test suite, which verifies correct implementation of authorization code flow, PKCE, token introspection, and other OIDC requirements.
Hydra supports PostgreSQL, MySQL, and CockroachDB as persistent storage backends. PostgreSQL is the most commonly used and best tested. SQLite is available for development but not recommended for production.
Hydra itself does not implement social login. However, you can implement social login (Google, GitHub, etc.) in your login endpoint and then complete the Hydra login flow. Alternatively, use Ory Kratos (Ory's identity management tool) alongside Hydra for built-in social login.
Ory provides several complementary open-source tools: Hydra (OAuth/OIDC), Kratos (identity management), Oathkeeper (API gateway), and Keto (permissions). They can be used independently or together for a complete identity and access management stack.
Sources citées (3)
- Ory Hydra GitHub Repository— Ory Hydra is OpenID Foundation certified
- Ory Hydra Official Docs— Ory Hydra documentation and deployment
- OpenID Foundation Certification— OpenID Connect certification program
En lien sur TokRepo
Fil de discussion
Actifs similaires
Plane — Open-Source AI Project Management
Open-source Jira/Linear alternative with AI-powered pages. Issues, sprints, modules, roadmaps, and real-time analytics. Self-hostable via Docker. AGPL-3.0, 47,500+ stars.
Reactive Resume — AI-Powered Open-Source Resume Builder
Free open-source resume builder with AI integration. Supports Claude, GPT, Gemini for content generation. Drag-and-drop, PDF export, self-hostable, privacy-first. MIT, 36,000+ stars.
Webstudio — Open Source Visual Website Builder
Webstudio is an open-source Webflow alternative with a visual drag-and-drop editor, full CSS support, headless CMS integration, and self-hosting on Cloudflare.
Twenty — Open-Source AI CRM (Salesforce Alternative)
Modern open-source CRM with AI features. Custom objects, kanban views, email sync, workflow automation. NestJS + React + PostgreSQL. AGPL-3.0, 43,700+ stars.