{"full_name":"teamhanko/hanko","owner":"teamhanko","name":"hanko","shard":"1","url":"https://github.com/teamhanko/hanko","description":"Modern authentication, on your terms. Open source alternative to Auth0, Clerk, WorkOS, Stytch.","homepage":"https://www.hanko.io","topics":["passkeys","webauthn","fido2","authentication","passwordless","jwt","oauth","sso","user-management","saml","ciam","2fa","mfa","iam"],"tag_pages":["2fa","authentication","iam","jwt","mfa","oauth","passkeys","saml","sso","webauthn"],"language":"Go","license":"AGPL-3.0","avatar":"https://avatars.githubusercontent.com/u/20222142?v=4","created_at":"2022-03-14T17:03:46Z","pushed_at":"2026-11-14T15:23:01Z","metrics":{"stars":9072,"forks":1024,"watchers":36,"issues":441,"prs":2650,"releases":44,"issues_open":40,"issues_closed":401,"prs_open":36,"prs_closed":911,"prs_merged":1703,"discussions":53},"growth":{"day":{"stars":0,"forks":1,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[9071,9070,9071,9072,9072,9072,9072],"forks":[1025,1024,1024,1024,1023,1023,1024],"watchers":[null,36,36,36,36,36,36],"issues_open":[null,40,40,40,40,40,40],"prs_open":[null,28,32,33,34,36,36]},"boards":{},"same_owner":[],"issues":[{"number":1462,"title":"Add CSS shadow parts to the accordion","comments":10,"created_at":"2024-05-15T16:34:36Z"},{"number":2338,"title":"500 response during social login (google)","comments":8,"created_at":"2025-12-12T14:33:04Z"},{"number":1104,"title":"Improve layout shift on load","comments":7,"created_at":"2023-10-18T09:47:36Z"},{"number":691,"title":"Custom fields / user data","comments":6,"created_at":"2023-03-22T14:53:27Z"},{"number":1806,"title":"Add devcontainers for easy Codespace setup","comments":4,"created_at":"2024-10-18T23:10:24Z"},{"number":1134,"title":"NextJS build failed because of `ReferenceError: CustomEvent is not defined`","comments":5,"created_at":"2023-10-25T09:44:28Z"},{"number":177,"title":"SMS code support","comments":5,"created_at":"2022-08-11T07:58:06Z"},{"number":2472,"title":"500 on login when account is not registered","comments":4,"created_at":"2026-03-04T15:47:49Z"}],"discussions":[{"number":2572,"title":"Task-based evaluation for LLM usage of Hanko SDK","comments":0,"category":"Q&A","created_at":"2026-03-30T15:48:08Z"},{"number":2410,"title":"Import users","comments":0,"category":"General","created_at":"2026-02-09T12:10:31Z"},{"number":2384,"title":"Hanko 2.4","comments":0,"category":"Announcements","created_at":"2026-01-20T14:59:46Z"},{"number":2296,"title":"API Documentation","comments":0,"category":"General","created_at":"2025-11-09T18:05:20Z"},{"number":2286,"title":"Passwordless","comments":0,"category":"General","created_at":"2025-10-26T07:55:28Z"},{"number":2251,"title":"Failed to execute before state hook (state: passcode_confirmation)","comments":2,"category":"Q&A","created_at":"2025-09-19T10:00:23Z"},{"number":2240,"title":"Support atproto-oauth login (Bluesky)","comments":0,"category":"Ideas","created_at":"2025-09-03T07:23:45Z"},{"number":2179,"title":"How do I delete my own account?","comments":1,"category":"Q&A","created_at":"2025-06-29T23:36:42Z"}],"latest_release":{"name":"Hanko v3.1","tag":"backend/v3.1.0","published_at":"2026-10-01T12:51:22Z","body":"Hanko v3.1 introduces **Organizations and Roles** for building B2B applications, alongside **Custom Claims and Mapping** for bringing identity provider attributes into your application. This release also adds session lifecycle webhooks, improves user imports, and includes several security fixes.\r\n\r\n## Organizations and Roles\r\n\r\nYou can now group users into organizations within a Hanko tenant and assign roles to their memberships. This gives applications a foundation for managing customer accounts, teams, and organization-specific access.\r\n\r\nRoles are defined at the tenant level and assigned to users within individual organizations. For example, a user can be an `admin` in one organization and a `member` in another, while your application uses the same role definitions across both.\r\n\r\nThe new APIs let you:\r\n\r\n- Create, list, update, and delete organizations and roles.\r\n- Add users to organizations and manage their role assignments.\r\n- Create users with organization memberships and roles in a single request.\r\n- Retrieve organization memberships and roles through the user APIs and session validation.\r\n- Check whether the current session holds any of a specified set of roles in an organization using `POST /organizations/roles/check`.\r\n\r\nYour application can use these role checks to enforce access to organization-specific resources. Organizations, memberships, and role bindings are scoped to their Hanko tenant.\r\n\r\nSee [[#2893](https://github.com/teamhanko/hanko/pull/2893)](https://github.com/teamhanko/hanko/pull/2893).\r\n\r\n## Custom Claims and Mapping\r\n\r\nHanko now supports tenant-defined custom claims, with mappings from **SAML attributes** and **custom OIDC/OAuth2 provider claims**. This lets you normalize identity data from different providers and make it available to your application through Hanko.\r\n\r\nFor example, different customer identity providers might represent a department or group membership under different attribute names. You can map those attributes to consistent Hanko custom claims such as `department` or `groups`, then include them in your session JWT.\r\n\r\n### Define and map your claims\r\n\r\nDeclare claim names, types, and optional descriptions under `custom_claims.definitions`. Definitions support scalar values and lists of scalars, with up to 50 custom claim definitions per tenant.\r\n\r\nConfigure mappings for each connection:\r\n\r\n- **SAML:** Map identity provider attributes using `attribute_map.custom`.\r\n- **Custom OIDC/OAuth2 providers:** Map values from the provider’s raw claims using `custom_claim_mapping`, with GJSON paths for selecting values.\r\n\r\nMappings are validated against your claim definitions when saved, helping catch configuration errors before users log in.\r\n\r\n### Use claims in your application\r\n\r\nCustom claim values are resolved and stored when a user logs in through a mapped connection. You can include them in JWT templates using references such as:\r\n\r\n```gotemplate\r\n{{ .User.CustomClaims \"department\" }}\r\n```\r\n\r\nWhen a template value consists solely of a custom claim reference, Hanko preserves its underlying type, including numbers, booleans, and arrays.\r\n\r\nStored claims are also available through the read-only Admin API endpoint `GET /users/:id/custom_claims`. The new `user.update.custom_claims` webhook event lets your application react when claim values change.\r\n\r\nClaim updates track their source connection: if that connection stops supplying a claim it owns, the value is cleared. An unrelated connection omitting the same claim does not clear it.\r\n\r\nSee [[#2884](https://github.com/teamhanko/hanko/pull/2884)](https://github.com/teamhanko/hanko/pull/2884).\r\n\r\n## Important for self-hosters: client IP resolution has changed\r\n\r\nThis release fixes a rate limit bypass caused by trusting client-supplied `X-Forwarded-For` and `X-Real-IP` headers.\r\n\r\n**Hanko now defaults to `direct` IP extraction**, using the connecting network peer’s address and ignoring forwarding headers.\r\n\r\nIf you run Hanko behind a reverse p","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}