MCPcopy Index your code
hub / github.com/teamhanko/hanko

github.com/teamhanko/hanko @backend-v2.7.0 sqlite

repository ↗ · DeepWiki ↗ · release backend-v2.7.0 ↗
3,362 symbols 11,145 edges 603 files 526 documented · 16%
README


Test Status Build Status Go Report Card GoDoc npm (scoped) npm (scoped)

About Hanko

Hanko is an open source authentication and user management solution that is easy to integrate, framework-agnostic, and built on privacy-first principles like data minimalism and phishing resistance.

  • Supports all modern authentication methods: passwords, MFA, passkeys, social logins, and SAML SSO
  • Flexible configuration options, including passkey-only, OAuth-only, and user-deletable passwords
  • Easy integration with Hanko Elements web components
  • A robust API that handles all authentication and onboarding flow states, enabling fast, reliable custom frontend implementations
  • API-first, lightweight, cloud-native

Available for self-hosting and as a fully managed service on Hanko Cloud.

Features

To follow the development of this project, watch our releases, leave a star, sign up to our Product News or join our Discord Community. Here's a brief overview of Hanko's current and upcoming features:

Status Feature
Email / username identifiers
Passwords, passcodes, passkeys
Hanko Elements web components
OAuth SSO (Sign in with Apple/Google/GitHub and more)
i18n & custom translations
SAML Enterprise SSO
Webhooks
Server-side sessions & remote session revocation
MFA (TOTP, security keys)
Custom OIDC/OAuth connections
JS SDK
⚙️ Organizations, Roles, Permissions
<hanko-menu> web component
iOS, Android, React Native, Flutter SDKs

Visit our Roadmap for more information on upcoming features.

Contact us

Schedule a demo with the team. Learn how you can built state-of-the-art authentication for your apps effortlessly with Hanko.

Book us with Cal.com

Architecture

The main building blocks of the Hanko project are - backend - Scalable, robust, and lightweight authentication API for passwords, passkeys, email passcodes, OAuth SSO, user and session management, and JWT issuing - hanko-elements - Web components made for the Hanko API that provide onboarding, login, and user profile functionality and are customizable with CSS - hanko-frontend-sdk - A client package for using the Hanko API

The remainder of the repository consists of: - quickstart - A quickstart example app showing off Hanko's login experience and acting as a reference implementation - examples - Example implementations for a number of frameworks - docs - The Hanko documentation (docs.hanko.io) -> Moved to its own repo here: https://github.com/teamhanko/docs

Getting started

  1. Try our hosted live example and our companion page passkeys.io or use the quickstart app to get a feel for the user experience provided by an application that leverages the Hanko backend API and our custom web component
  2. To run the project locally, there are two options available:
  3. Bare metal:
    • Head over to the backend section to learn how to get it up and running for your own project. Use Hanko Cloud for a hosted backend.
  4. Docker:
    • If you prefer to use Docker to run the project locally, please visit the Run the quickstart for information on how to run the project. This will create everything, including frontend and backend components.
      • If you wish to keep only the backend components, you can modify the quickstart.yaml to remove the unnecessary services. To make changes to the configuration to meet your needs, modify config.yaml.
  5. Then, integrate hanko-elements – we provide example applications and guides for your favourite frontend framework in the official documentation

If you want to use the Hanko backend API but prefer to build your own UI, you can still make use of the hanko-frontend-sdk. It forms the basis of our web components, and the client it provides handles communication with the Hanko backend API and saves you the time of rolling your own.

Community

Questions, bugs, ideas

If you have any questions or issues, please check this project's Q&A section in discussions and the open issues. Feel free to comment on existing issues or create a new issue if you encounter any bugs or have a feature request. For yet unanswered questions, feedback, or new ideas, please open a new discussion.

Discord community & X

We invite you to join our growing Discord Community if you want to get the latest updates on passkeys, WebAuthn, and this project or if you just want to chat with us. You can also follow us on X.

Licenses

hanko-elements and hanko-frontend-sdk are licensed under the MIT License. Everything else in this repository, including hanko backend, is licensed under the AGPL-3.0. Non-Copyleft commercial licensing is available on request.

Extension points exported contracts — how you extend this code

Action (Interface)
Action defines the interface for flow actions. [64 implementers]
backend/flowpilot/flow.go
Action (Interface)
(no doc) [64 implementers]
frontend/frontend-sdk/src/lib/flow-api/types/action.ts
KeyGenerator (Interface)
KeyGenerator Interface for JSON Web Key Generation [4 implementers]
backend/crypto/jwk/local_db/generator.go
OAuthProvider (Interface)
(no doc) [8 implementers]
backend/thirdparty/provider.go
PrimaryEmailPersister (Interface)
(no doc) [14 implementers]
backend/persistence/primary_email_persister.go
OTPAdminHandler (Interface)
(no doc) [19 implementers]
backend/handler/otp_admin.go
FlowLocker (Interface)
FlowLocker provides an interface for locking flow execution by flow ID [3 implementers]
backend/flow_api/flow_locker/flow_locker.go
Logger (Interface)
(no doc) [2 implementers]
backend/audit_log/logger.go

Core symbols most depended-on inside this repo

Get
called by 398
backend/flowpilot/context.go
String
called by 340
backend/flowpilot/jsonmanager/manager.go
Stash
called by 289
backend/flowpilot/context.go
Set
called by 286
backend/flowpilot/flow.go
Error
called by 227
backend/flowpilot/context.go
Get
called by 159
backend/handler/webhook.go
GetDeps
called by 114
backend/flow_api/flow/shared/flow.go
SuspendAction
called by 91
backend/flowpilot/context.go

Shape

Method 1,770
Function 715
Struct 456
Interface 245
Class 125
TypeAlias 48
FuncType 3

Languages

Go79%
TypeScript21%

Modules by API surface

backend/persistence/persister.go106 symbols
backend/flowpilot/flow.go56 symbols
frontend/frontend-sdk/src/lib/Errors.ts53 symbols
backend/flowpilot/input.go45 symbols
backend/flowpilot/context.go43 symbols
backend/flowpilot/builder.go41 symbols
backend/flowpilot/stash.go37 symbols
backend/flow_api/services/webauthn.go31 symbols
backend/flowpilot/errors.go27 symbols
frontend/frontend-sdk/src/lib/flow-api/types/input.ts26 symbols
backend/flowpilot/input_schema.go26 symbols
backend/persistence/models/user.go24 symbols

Dependencies from manifests, versioned

dario.cat/mergov1.0.1 · 1×
filippo.io/edwards25519v1.2.0 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/Masterminds/semver/v3v3.4.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/Nvveen/Gottyv0.0.0-2012060400481 · 1×
github.com/aws/aws-sdk-go-v2v1.41.6 · 1×
github.com/aws/aws-sdk-go-v2/configv1.32.16 · 1×
github.com/aws/aws-sdk-go-v2/credentialsv1.19.15 · 1×
github.com/aws/aws-sdk-go-v2/feature/ec2/imdsv1.18.22 · 1×
github.com/aws/aws-sdk-go-v2/internal/configsourcesv1.4.22 · 1×
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2v2.7.22 · 1×

Datastores touched

(mysql)Database · 1 repos
dummyDatabase · 1 repos
hankoDatabase · 1 repos

For agents

$ claude mcp add hanko \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact