Modern authentication, on your terms. Open source alternative to Auth0, Clerk, W...
GitHub RepoImpressions1.3k

Modern authentication, on your terms. Open source alternative to Auth0, Clerk, W...

@githubprojectsPost Author

Project Description

View on GitHub

Hanko: The Open Source Authentication You Control

Authentication is one of those things that can quickly turn from a simple feature into a complex, expensive headache. Services like Auth0 and Clerk are great, but they lock you into their ecosystem, their pricing, and their roadmap. What if you could have modern, secure authentication that you actually own and host yourself?

That's exactly what Hanko offers. It's an open source alternative that gives you the same slick, developer-friendly experience—think passwordless logins, passkeys, and social sign-ins—but with the keys to the kingdom firmly in your hands. No vendor lock-in, no surprise bills, just your code and your infrastructure.

What It Does

Hanko is a self-hosted, open source authentication service. It provides a suite of APIs and a customizable frontend component to handle user identity. You get the core features you'd expect from a modern auth provider: email-based magic links, WebAuthn/passkey support, and social logins (via Google, GitHub, etc.), all wrapped in a developer-centric API.

At its heart, it's a Go-based backend service that manages users, sessions, and tokens, paired with a lightweight JavaScript web component for the frontend UI. You deploy it alongside your app, connect it to your database, and you're in control of the entire flow and the user data.

Why It's Cool

The cool factor here isn't about a single flashy feature—it's about the philosophy. Hanko takes the convenience of a managed service and combines it with the freedom of open source.

First, it's built with passkeys as a first-class citizen. It leverages WebAuthn to enable secure, phishing-resistant logins using biometrics or security keys, which is quickly becoming the gold standard. You get this future-proof tech without needing to be a cryptography expert.

Second, it's truly self-hostable and simple to run. The team provides a Docker Compose setup that gets you a fully working instance in minutes. Because you host it, you have complete data sovereignty and can customize it to fit your exact needs, whether that's tweaking the user journey or integrating with your existing user table.

Finally, it avoids the "all-or-nothing" trap. It's designed to be modular and API-first. You can use just the parts you need—maybe you only want the passkey backend—and you can style the pre-built UI components to match your app perfectly. It's a building block, not a walled garden.

How to Try It

The quickest way to see Hanko in action is to check out their live demo. To spin up your own instance, the GitHub repo has a straightforward path.

  1. Clone the repository:
    git clone https://github.com/teamhanko/hanko.git
    
  2. Navigate to the docker/compose directory and fire it up:
    cd hanko/docker/compose
    docker-compose up
    
  3. That's it. You'll have the Hanko server running locally. Head over to their documentation for next steps on configuring connections (like your database and social providers) and integrating it into your application.

Final Thoughts

Hanko hits a sweet spot. It's for developers who are tired of auth being a black-box service that's expensive and inflexible, but who also don't want to build and maintain a secure auth system from scratch. It gives you the modern UX your users expect, with the control and cost predictability that your engineering team wants.

If you're starting a new project and want to own your auth stack, or if you're looking to migrate off a pricey SaaS auth provider, Hanko is absolutely worth a weekend of experimentation. It might just be the open source foundation your login system has been missing.


Found this interesting? Follow @githubprojects for more cool open source projects.

Back to Projects
Project ID: c16b76d9-c540-454a-8582-b542babbdb2aLast updated: December 10, 2025 at 05:12 AM