logto-io / logto

logto-io / logto

Logto is the modern, open-source auth infrastructure for SaaS and AI apps. It takes the pain out of OIDC and OAuth 2.1 and makes it easy to build secure, production-ready auth with multi-tenancy, enterprise SSO, and RBAC. Logto 是专为 SaaS 和 AI 应用打造的现代化开源身份验证基础设施。它消除了 OIDC 和 OAuth 2.1 的复杂性,让开发者能够轻松构建具备多租户、企业级 SSO 和 RBAC 功能的生产级安全认证系统。

website • cloud • docs • api • blog • auth wiki • newsletter 网站 • 云服务 • 文档 • API • 博客 • 认证百科 • 时事通讯

Why Logto? Built for teams scaling SaaS, AI, and agent-based platforms without the usual auth headaches. With Logto, you get: 为什么选择 Logto?它专为扩展 SaaS、AI 和基于 Agent 的平台的团队而设计,免去了常见的身份验证难题。使用 Logto,您可以获得:

  • Multi-tenancy, enterprise SSO, and RBAC: ready to use, no workarounds. 多租户、企业级 SSO 和 RBAC:开箱即用,无需额外变通。
  • Pre-built sign-in flows, customizable UIs, and SDKs for 30+ frameworks. 预构建的登录流程、可自定义的 UI 以及支持 30 多种框架的 SDK。
  • Full support for OIDC, OAuth 2.1, and SAML without the protocol pain. 全面支持 OIDC、OAuth 2.1 和 SAML,无需处理繁琐的协议细节。
  • Works out-of-the-box for Model Context Protocol and agent-based AI architectures. 针对模型上下文协议 (MCP) 和基于 Agent 的 AI 架构提供开箱即用的支持。

🗺️ See all features → 🗺️ 查看所有功能 →

Get started

快速开始

Pick your path: 选择您的路径:

Logto Cloud: The fastest way to try Logto. Fully managed, zero setup. Logto Cloud:体验 Logto 最快的方式。全托管,零配置。

Launch Logto in GitPod: Start Logto OSS in seconds. Wait for the message “App is running at https://3002-…gitpod.io”, then click the URL starting with https://3002- to continue. 在 GitPod 中启动 Logto:几秒钟内即可启动 Logto 开源版。等待出现 “App is running at https://3002-…gitpod.io” 消息,然后点击以 https://3002- 开头的 URL 继续。

Local development: 本地开发:

# Using Docker Compose (requires Docker Desktop)
curl -fsSL https://raw.githubusercontent.com/logto-io/logto/HEAD/docker-compose.yml | \
  docker compose -p logto -f - up

# Using Node.js (requires PostgreSQL)
npm init @logto

使用 Docker Compose (需要 Docker Desktop)

使用 Node.js (需要 PostgreSQL)

📚 Full OSS installation guide → 📚 完整的开源版安装指南 →

Integrate anywhere

随处集成

Logto supports all your apps, APIs, and services with industry-standard protocols. Logto 通过行业标准协议支持您的所有应用、API 和服务。

  • SDKs for 30+ frameworks: React, Next.js, Angular, Vue, Flutter, Go, Python, and more. 支持 30 多种框架的 SDK:React、Next.js、Angular、Vue、Flutter、Go、Python 等。
  • Connect to any IdP: Google, Facebook, Azure AD, Okta, and more. 连接到任何身份提供商 (IdP):Google、Facebook、Azure AD、Okta 等。
  • Flexible integration: SPAs, web apps, mobile apps, APIs, M2M, CLI tools. 灵活的集成方式:单页应用 (SPA)、Web 应用、移动应用、API、机器对机器 (M2M)、CLI 工具。
  • Ready for Model Context Protocol and agent-based architectures. 为模型上下文协议和基于 Agent 的架构做好准备。

🚀 Explore quick starts → 🚀 探索快速入门 →

🔌 See all connectors → 🔌 查看所有连接器 →

Showcase

特性展示

  • Developer-first SDKs: Install in minutes with clear guides. 开发者优先的 SDK:通过清晰的指南,几分钟内即可完成安装。
  • User-friendly auth flows: Sign-up, sign-in, social login, Google One Tap, MFA, SSO. 用户友好的认证流程:注册、登录、社交登录、Google 一键登录、多因素认证 (MFA)、SSO。
  • Multi-tenancy & organizations: Organization RBAC, member invites, just-in-time provisioning, and more. 多租户与组织:组织 RBAC、成员邀请、即时配置 (JIT) 等。

Support Logto

支持 Logto

If you find Logto helpful, here’s how you can support us: 如果您觉得 Logto 有所帮助,可以通过以下方式支持我们:

  • ⭐ Star this repo to show your support! ⭐ 给本项目加星以示支持!
  • 💬 Join our Discord for live discussions. 💬 加入我们的 Discord 进行实时讨论。
  • 📢 Share Logto on Twitter, LinkedIn, Reddit, Telegram, WhatsApp. 📢 在 Twitter、LinkedIn、Reddit、Telegram、WhatsApp 上分享 Logto。
  • 🏆 Write a review or tutorial on dev.to, Medium, G2 or your blog. 🏆 在 dev.to、Medium、G2 或您的博客上撰写评论或教程。
  • 💬 Share your use case with us and get featured on the Logto website. 💬 与我们分享您的使用案例,并有机会在 Logto 官网上展示。
  • 🙋 Open an issue to report bugs or suggest features. 🙋 提交 Issue 以报告 Bug 或建议新功能。
  • 💻 Contribute to Logto - we’d love your help! 💻 为 Logto 贡献代码 - 我们期待您的帮助!

Check out Logto awesome of community-contributed resources. 查看 Logto 社区贡献的资源精选 (Awesome Logto)。

Licensing MPL-2.0. 许可协议:MPL-2.0。

⬆️ Back to top ⬆️ 回到顶部