Logto — Open Source Authentication & Authorization for SaaS
Logto is an open-source Auth0 alternative providing OIDC/OAuth 2.1 authentication with multi-tenancy, SSO, RBAC, and MFA for modern SaaS and AI apps.
What it is
Logto is an open-source authentication and authorization platform built on OIDC and OAuth 2.1 standards. It provides a complete identity infrastructure for SaaS applications including customizable sign-in pages, social login (Google, GitHub, Apple), enterprise SSO via SAML and OIDC, multi-factor authentication, role-based access control, and multi-tenancy with per-organization settings. Released under MPL-2.0.
Logto targets SaaS developers who need production-ready authentication without building it from scratch. It serves as an alternative to Auth0, Clerk, and Firebase Auth with full data ownership when self-hosted.
How it saves time or tokens
Logto eliminates the weeks of development typically needed to implement authentication, authorization, and user management. The pre-built sign-in UI handles all edge cases (password reset, email verification, social login flows) out of the box. Multi-tenancy support with organization management saves significant custom development for B2B SaaS products.
How to use
- Run the Docker container with PostgreSQL connection configured.
- Access the admin console at localhost:3002 to configure your sign-in experience and application settings.
- Integrate with your application using the Logto SDK for your framework (React, Next.js, Vue, Express, etc.).
Example
docker run --name logto -p 3001:3001 -p 3002:3002 \
-e DB_URL=postgres://postgres:password@host.docker.internal:5432/logto \
ghcr.io/logto-io/logto:latest
# Admin console at http://localhost:3002
# Auth endpoint at http://localhost:3001
Related on TokRepo
- AI Tools for Security -- Authentication and security tools for applications
- AI Tools for API -- API gateway and auth tools
Common pitfalls
- The Docker container requires a PostgreSQL database; the embedded database option is for development only and does not persist data across restarts.
- OIDC redirect URIs must be configured exactly; trailing slashes or protocol mismatches cause silent authentication failures.
- Multi-tenancy (Organizations) requires the cloud plan or self-hosted enterprise setup; the basic self-hosted version has limited multi-tenancy features.
Frequently Asked Questions
Logto provides core Auth0 features -- OIDC, social login, SSO, MFA, RBAC, and organizations -- as open-source software. Auth0 has a larger ecosystem of pre-built integrations and a more mature rule/action system. Logto is free when self-hosted, while Auth0 charges based on active users. For new SaaS projects, Logto covers most authentication needs at zero cost.
Yes. Logto supports passwordless sign-in via magic links, email OTP, and SMS OTP. You can configure passwordless as the primary sign-in method or offer it alongside traditional email/password authentication.
Yes. The admin console provides a sign-in experience editor where you configure branding (logo, colors, dark mode), sign-in methods, social connector buttons, and terms of service links. For deeper customization, you can build a custom sign-in page using the Logto SDK.
Logto offers official SDKs for React, Next.js, Vue, Angular, Express, Koa, Python, Go, Swift (iOS), and Kotlin (Android). The SDKs handle the OIDC flow, token management, and session handling. Any OIDC-compatible library also works with Logto.
Yes. Logto supports SAML and OIDC federation for enterprise SSO, multi-tenancy with per-organization settings, and user provisioning. Enterprise customers can sign in through their corporate identity provider (Okta, Azure AD, Google Workspace) while you manage access through Logto's organization system.
Citations (3)
- Logto GitHub— Logto is an open-source Auth0 alternative with OIDC/OAuth 2.1
- Logto Documentation— OIDC and OAuth 2.1 standards for authentication
- IETF OAuth 2.1— OAuth 2.1 specification draft
Related on TokRepo
Source & Thanks
- GitHub: logto-io/logto — 11.9K+ ⭐ | MPL-2.0
- Website: logto.io
Discussion
Related Assets
doctest — The Fastest Feature-Rich C++ Testing Framework
doctest is a single-header C++ testing framework designed for minimal compile-time overhead and maximum speed.
Chai — BDD/TDD Assertion Library for Node.js
Chai is a flexible assertion library for Node.js and browsers that supports expect, should, and assert styles.
Supertest — HTTP Assertion Library for Node.js APIs
Supertest provides a high-level API for testing HTTP servers in Node.js with fluent assertion chaining.