Skip to content
FossShelf
Home / Categories / For Web Developers

limen

Composable authentication for modern Go backends

Replaces Auth0, Okta, Workos

0.57K starsMITreviewed 12 Aug 2026last commit 13 Nov 2026
Screenshot of limen

Who it's for

API developers building SaaS platforms in Go

Limen handles credential-password, OAuth, and session management for multi-tenant SaaS backends without per-user fees. The TypeScript client SDK integrates with React, Vue, or Svelte frontends. Database adapters let you store auth data alongside application data in PostgreSQL or MySQL, simplifying data governance and backup strategies.

You need enterprise SSO (SAML) or directory sync (SCIM) out of the box. Limen focuses on OAuth 2.0, OIDC, and credential flows. Enterprise identity federation requires custom implementation or a commercial provider.

Go microservices teams consolidating auth logic

Deploy Limen as a shared authentication service across multiple Go microservices. The plugin architecture lets you standardize on one auth implementation while each service imports only the plugins it needs. Framework-agnostic design works whether your services use Gin, Chi, or Echo.

Your microservices are polyglot (mixed languages). Limen is Go-only on the backend. If your services span Go, Node.js, and Python, a language-agnostic auth service like Ory or Keycloak may fit better.

Teams migrating from Auth0 or Clerk to cut costs

Limen replicates the core feature set of Auth0 and Clerk (password auth, social login, sessions, two-factor) without monthly per-user billing. For a SaaS with 50k monthly active users, Auth0 costs $1,050/month on the Professional plan. Limen costs the price of a $20/month VPS, saving $12k annually.

You rely on Auth0's advanced features like bot detection, breached password detection, or anomaly detection. Limen covers authentication flows but not the fraud prevention and threat intelligence layers that managed platforms provide.

Solo developers and bootstrapped startups

Limen provides production-grade authentication without the recurring cost of managed services. The MIT license means no usage limits, no credit card required, and no pricing tier surprises as you grow. Self-hosting on a $5/month VPS is viable for early-stage products with under 10k users.

You are non-technical or lack Go experience. Limen requires writing Go integration code, managing database migrations, and deploying a Go application. If you need a no-code auth solution, a managed service like Supabase Auth or Firebase is faster to ship.

The problem

Authentication in Go is repetitive and expensive. Every new project requires rewriting session management, OAuth flows, password hashing, and security primitives from scratch. Commercial authentication platforms like Auth0, Clerk, and WorkOS solve the complexity problem but introduce vendor lock-in, per-user pricing that scales unpredictably, and data sovereignty concerns. Self-hosted alternatives like Ory Kratos require dedicated infrastructure, complex deployment configurations, and learning curves that delay shipping. Most Go developers either spend weeks building custom auth or pay monthly fees that compound as their user base grows, with no middle ground for teams that want control without the infrastructure burden.

How it works

Plugin-first modular architecture

The core library ships interfaces, session management, and security primitives. Authentication methods like credential-password, OAuth, two-factor, and magic links live in separate Go modules that you import only when needed. This keeps your binary small and your dependencies minimal. If you only need password auth, you pull one plugin. If you add OAuth later, you import the OAuth module without touching existing code.

Framework-agnostic design

Works with any Go framework that supports the standard net/http package, including Gin, Chi, Echo, Fiber, and plain http.ServeMux. You mount Limen's handler at /auth/ and it integrates with your routing layer without framework-specific adapters. No vendor lock-in at the framework level. Migration between frameworks does not require rewriting authentication logic.

Database adapter pattern

Bring your own database. Adapters exist for GORM (PostgreSQL, MySQL, SQLite) and database/sql. If you use a different ORM or data layer, write your own adapter by implementing the storage interface. Your auth data lives in your existing database schema, not in a separate service or external provider.

TypeScript client SDK

The npm package limen-auth provides a fully typed TypeScript client for frontend integration. Handles sign-in, session management, and reactive session state with hooks for React, Vue, Svelte, and Solid. Your backend and frontend authentication code stay in sync through shared types, reducing integration bugs.

OAuth and social login support

Comprehensive OAuth 2.0 and OpenID Connect support with first-party providers for Google, GitHub, Apple, and any OAuth 2.0 or OIDC provider. Provider configuration is declarative. Add a new social login by importing the provider module and passing credentials. No external OAuth proxy required.

Built-in session management and route guards

Session storage, CSRF protection, secure cookie handling, and route guards ship in the core. Sessions are signed and encrypted by default. Rate limiting and security middleware are included, not bolted on. You configure session duration and renewal policies without implementing cryptographic primitives yourself.

Features

  • Plugin-first modular architecture
  • Framework-agnostic design
  • Database adapter pattern
  • TypeScript client SDK
  • OAuth and social login support
  • Built-in session management and route guards

How to install

Limen requires Go 1.25 or later. Install the core library, then add the database adapter and auth plugins your backend needs.

go get github.com/thecodearcher/limen
go get github.com/thecodearcher/limen/adapters/gorm
go get github.com/thecodearcher/limen/plugins/credential-password

Configure Limen with your database connection and plugins, then mount the handler at `/auth/` in your router:

auth, err := limen.New(&limen.Config{
  BaseURL:  "http://localhost:8080",
  Database: gormadapter.New(db),
  Secret:   []byte("your-32-byte-secret-key"),
  Plugins: []limen.Plugin{
    credentialpassword.New(),
  },
})

mux := http.NewServeMux()
mux.Handle("/api/auth/", auth.Handler())

Alternatively, set the `LIMEN_SECRET` environment variable and omit the Secret field. Full configuration options and examples are at limenauth.dev.

Recommended for this setup

Strengths

  • MIT license with no usage limits: Limen is MIT licensed, so you can deploy it commercially, modify the source, and scale to any user count without licensing fees or per-user pricing. Unlike Auth0 (starts at $25/month, scales per MAU) or Clerk ($25/month for 10k MAUs), your authentication cost is fixed at server hosting regardless of traffic.
  • Modular design prevents dependency bloat: Only the plugins you import get compiled into your binary. If you use password auth without OAuth, the OAuth dependencies never enter your build. This keeps binary size small and attack surface minimal. Contrast this with monolithic auth libraries where every feature ships whether you use it or not.
  • Active development and recent commits: Last commit on 2026-08-11, created in August 2025, showing active maintenance. The library is under a year old but already supports credential-password, OAuth, two-factor, magic links, and multi-tenant patterns. GitHub shows 505 stars, 20 forks, and only 3 open issues, indicating clean implementation and responsive maintainers.
  • No external service dependencies: Authentication logic runs entirely in your application process. No separate auth service to deploy, no external API calls to a managed platform, no network hops for session validation. Latency stays low, and downtime risk is isolated to your own infrastructure, not a third-party SaaS.

Trade-offs

  • Newer library with smaller ecosystem: Limen launched in August 2025, making it under a year old. While actively maintained, the community is smaller than established Go auth libraries like Ory or Authboss. Fewer community plugins, integrations, and Stack Overflow answers exist. Early adopters should expect to read source code for advanced use cases rather than relying on extensive documentation.
  • Self-assembly required for advanced workflows: Limen provides the building blocks but leaves orchestration to you. Multi-step flows like email verification with password reset, account linking across OAuth providers, or admin-initiated user provisioning require composing multiple plugins and writing glue code. Managed platforms like Auth0 ship these workflows as turnkey features.
  • Database migration responsibility: Schema changes for auth tables (users, sessions, accounts) are your responsibility. The GORM adapter auto-migrates tables, but production schema evolution, zero-downtime migrations, and rollback plans are on you. Managed auth services handle schema changes transparently in their infrastructure.

Tech stack

Languages
Go, TypeScript, JavaScript
Frameworks
React, Svelte, Vue
Databases
—
Tooling
OAuth 2.0

FAQ

Is Limen free to use?

Yes, Limen is MIT licensed and free to use commercially with no restrictions. The self-hosted version has no user limits, no feature tiers, and no paid upgrades. You pay only for the server hosting your Go application. Unlike managed auth platforms that charge per monthly active user, Limen's cost is fixed regardless of scale.

How does Limen compare to Ory Kratos or Supabase Auth?

Limen is a Go library you import into your application, while Ory Kratos is a standalone service you deploy separately. Kratos requires Docker, PostgreSQL, and learning Ory's identity schema DSL. Limen integrates directly into your existing Go codebase with standard database adapters. Supabase Auth is PostgreSQL-specific and tightly coupled to Supabase's ecosystem. Limen works with any database via adapters and any Go framework via net/http.

Does Limen work with Gin, Echo, Fiber, or Chi?

Yes, Limen is framework-agnostic and works with any Go framework that supports net/http. You mount Limen's handler at a path like /auth/ and it handles authentication routes without framework-specific adapters. The documentation includes examples for Gin, Chi, Echo, and Fiber. Plain http.ServeMux also works.

Can I use Limen with an existing database schema?

Yes, but you need to implement a custom storage adapter. Limen's GORM adapter auto-migrates default tables for users, sessions, accounts, and verification tokens. If your schema differs, write an adapter that implements the storage interface. The interface methods map cleanly to standard CRUD operations, so adapter code is typically under 200 lines.

What authentication methods does Limen support?

Limen supports credential-password (email or username plus password with secure hashing), OAuth 2.0 and OpenID Connect (Google, GitHub, Apple, and any OIDC provider), two-factor authentication (TOTP and backup codes), magic links (passwordless email login), and API keys. Multi-tenant patterns are supported. Each method is a separate plugin you import only if needed.

Similar tools

More in Web Developers