logto

πŸ§‘β€πŸš€ Authentication and authorization infrastructure for SaaS and AI apps, built on OIDC and OAuth 2.1 with multi-tenancy, SSO, and RBAC.

14,315 stars TypeScript Markdown Skills API Spec #authentication#authorization#email#identity
AI Prompts & Specs

<p align="center">
<a href="https://logto.io/?utm_source=github&utm_medium=readme" target="_blank" align="center" alt="Go to Logto website">
<picture>
<source width="200" media="(prefers-color-scheme: dark)" srcset="https://github.com/logto-io/.github/raw/master/profile/logto-logo-dark.svg">
<source width="200" media="(prefers-color-scheme: light)" srcset="https://github.com/logto-io/.github/raw/master/profile/logto-logo-light.svg">
<img width="200" src="https://github.com/logto-io/logto/raw/master/logo.png" alt="Logto logo">
</picture>
</a>
</p>

![discord](https://discord.gg/vRvwuwgpVX)
![checks](https://github.com/logto-io/logto/actions?query=branch%3Amaster)
![release](https://github.com/logto-io/logto/releases)
![core coverage](https://app.codecov.io/gh/logto-io/logto)
![cloud](https://cloud.logto.io/?sign_up=true&utm_source=github&utm_medium=repo_logto)
![gitpod](https://gitpod.io/#https://github.com/logto-io/demo)
![render](https://render.com/deploy?repo=https://github.com/logto-io/logto)

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.

<p align="center">
<a href="https://logto.io/">website</a> β€’
<a href="https://cloud.logto.io/">cloud</a> β€’
<a href="https://docs.logto.io">docs</a> β€’
<a href="https://openapi.logto.io/">api</a> β€’
<a href="https://blog.logto.io/">blog</a> β€’
<a href="https://auth-wiki.logto.io/">auth wiki</a> β€’
<a href="https://logto.io/subscribe">newsletter</a>
</p>

!Logto features

Why Logto?

Built for teams scaling SaaS, AI, and agent-based platforms without the usual auth headaches.

With Logto, you get:

- Multi-tenancy, enterprise SSO, and RBAC: ready to use, no workarounds.
- Pre-built sign-in flows, customizable UIs, and SDKs for 30+ frameworks.
- Full support for OIDC, OAuth 2.1, and SAML without the protocol pain.
- Works out-of-the-box for Model Context Protocol and agent-based AI architectures.

πŸ—ΊοΈ See all features β†’

Get started

Pick your path:

- Logto Cloud: The fastest way to try Logto. Fully managed, zero setup.
- 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.

- Local development:

bash
# 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

πŸ“š Full OSS installation guide β†’

Integrate anywhere

Logto supports all your apps, APIs, and services with industry-standard protocols.

- SDKs for 30+ frameworks: React, Next.js, Angular, Vue, Flutter, Go, Python, and more.
- Connect to any IdP: Google, Facebook, Azure AD, Okta, and more.
- Flexible integration: SPAs, web apps, mobile apps, APIs, M2M, CLI tools.
- Ready for Model Context Protocol and agent-based architectures.

πŸš€ Explore quick starts β†’

πŸ”Œ See all connectors β†’

Showcase

Developer-first SDKs: Install in minutes with clear guides.

!Logto auth SDK showcase

User-friendly auth flows: Sign-up, sign-in, social login, Google One Tap, MFA, SSO.

!Logto sign-in experience showcase

Multi-tenancy & organizations: Organization RBAC, member invites, just-in-time provisioning, and more.

!Logto multi-tenancy showcase

Support Logto

If you find Logto helpful, here's how you can support us:

- ⭐ Star this repo to show your support!
- πŸ’¬ Join our Discord for live discussions.
- πŸ“’ Share Logto on Twitter, LinkedIn, Reddit, Telegram, WhatsApp.
- πŸ† Write a review or tutorial on dev.to, Medium, G2 or your blog.
- πŸ’¬ Share your use case with us and get featured on the Logto website.
- πŸ™‹ Open an issue to report bugs or suggest features.
- πŸ’» Contribute to Logto - we'd love your help! Check out Logto awesome of community-contributed resources.

Licensing

MPL-2.0.

<p align="right">
⬆️ <a href="#logto">Back to top</a>
</p>