qmetrics.net

Best Open-Source Alternatives to Amazon Cognito

Amazon Cognito by Amazon Web Services is a commercial product. These open-source projects say they can replace it.

The most popular open-source alternative to Amazon Cognito is Keycloak, with 38.1k GitHub stars. Other open-source alternatives to Amazon Cognito are Authelia, authentik, Ory and Zitadel (3 more below). Most Amazon Cognito alternatives here are Identity & Access Management (IAM) tools, some are Application Security. The first 2 say in their own README or website that they can replace Amazon Cognito (the quote is shown under each one); the other 6 do the same job, shown with their own description.

Stars and activity updated 27 November 2026.

Sort:Most starsRecentA–Z

SuperTokens

Open-source user login and session management

SuperTokens adds sign-up, sign-in, and session handling to applications through frontend SDKs, backend SDKs, and a core HTTP auth service.

★ 15.3k⟳ todayApache-2.0 · open core
Open Source Alternative to:Amazon CognitoAuth0Clerk+1
“Open source alternative to Auth0 / Firebase Auth / AWS Cognito”

Hanko

Passkey-ready authentication and user management platform

Hanko provides authentication and user management with passkeys, MFA, OAuth, and SAML SSO. It integrates via web components, a frontend SDK, or a custom UI against its API.

★ 9.1k⟳ yesterdayAGPL-3.0
Open Source Alternative to:Amazon CognitoAuth0Clerk+3
“A developer-friendly alternative to Auth0, Clerk, Firebase Auth, AWS Cognito, or Keycloak, with full control over your data.”

Also does the same job as Amazon Cognito

These projects don't call themselves a Amazon Cognito alternative, but two independent checks of their own description found they do the same main job.

Keycloak

Identity and access management for applications and services

Keycloak adds authentication and single sign-on to applications so they do not store or verify users themselves. It supports standard protocols and central admin tools.

★ 38.1k⟳ todayApache-2.0
Open Source Alternative to:Amazon CognitoAuth0Clerk+6
“Open Source Identity and Access Management For Modern Applications and Services”

Authelia

Self-hosted SSO portal with multi-factor authentication

Authentication and authorization server that sits in front of reverse proxies. Provides a web portal for login, OpenID Connect, and granular access rules with several second-factor methods.

★ 29.8k⟳ todayApache-2.0
Open Source Alternative to:Amazon CognitoAuth0Stytch+1
“Authelia is a free and open-source IAM platform and OpenID Certified™ OpenID Connect 1.0 provider; providing modern, flexible authentication and authorization.”

authentik

Self-hosted identity provider for SSO protocols

authentik centralizes authentication with SAML, OAuth2, OIDC, LDAP, RADIUS, and related flows. It targets small labs through production clusters you deploy yourself.

★ 26.5k⟳ todayMIT · open core
Open Source Alternative to:Amazon CognitoAuth0Clerk+4
“authentik is an open-source Identity Provider (IdP) for modern SSO.”

Ory

OpenID Connect and OAuth2 authorization server

Ory Hydra is an OAuth 2.0 and OpenID Connect server that issues and validates tokens and orchestrates login and consent flows. It connects to existing identity systems through a separate login and consent application.

★ 17.7k⟳ 4 months agoApache-2.0
Open Source Alternative to:Amazon CognitoMicrosoft Entra IDOkta+3
“Internet-scale OpenID Certified™ OpenID Connect and OAuth2.1 provider that integrates with your user management through headless APIs. Solve OIDC/OAuth2 user cases over night. Consume as a service on Ory Network or self-host. Trusted by OpenAI and many others for scale and security. Written in Go.”

Zitadel

Multi-tenant API-first open-source identity and access management platform

ZITADEL is an open-source identity and access management platform with SSO, MFA, passkeys, OIDC, SAML, and SCIM. You can self-host it or use the hosted cloud service with the same codebase.

★ 15.7k⟳ todayAGPL-3.0
Open Source Alternative to:Amazon CognitoAuth0Clerk+6
“ZITADEL is an open-source identity and access management platform built for teams that need more than basic auth.”

Casdoor

Self-hosted identity provider with SSO and agent MCP gateway

Casdoor is an IAM server with a web console for users, apps, and providers. It issues tokens via OAuth, OIDC, SAML, CAS, LDAP, SCIM, and WebAuthn, and exposes an MCP gateway for AI tooling

★ 15k⟳ 2 days agoApache-2.0
Open Source Alternative to:Amazon CognitoAuth0Okta+2
“Casdoor is a single sign-on (SSO) and authentication server with a web console.”

Compare Amazon Cognito alternatives

Questions about Amazon Cognito alternatives

Is there an open-source alternative to Amazon Cognito?

Yes. 8 open-source projects can replace Amazon Cognito, for example Keycloak, Authelia and authentik. 2 of them say so in their own documentation; the other 6 do the same job.

What is the best open-source alternative to Amazon Cognito?

Keycloak (38.1k GitHub stars) is the most popular open-source alternative to Amazon Cognito on GitHub. The best choice depends on your needs: compare them side by side, for example Keycloak vs Authelia.

Are the open-source alternatives to Amazon Cognito free?

All of the 8 projects listed here are free to use under an open-source license, with no license fee: 6 permissive (such as Apache-2.0), 2 copyleft (such as AGPL-3.0). Running software on your own server still costs hosting and upkeep, and many projects also sell a hosted version.

Related commercial products

Auth0

Okta

10 open-source alternatives

Stytch

Stytch

8 open-source alternatives

Clerk

Clerk

7 open-source alternatives

Okta

Okta

7 open-source alternatives

Firebase Authentication

Google

6 open-source alternatives

Ping Identity

Ping Identity

6 open-source alternatives