
What would a Better Auth–level developer experience look like in Go? That question turned into Limen, an open-source plugin-first auth library.
title: I couldn’t find Better Auth in Go, so I built one published: true description: What would a Better Auth–level developer experience look like in Go? That question turned into Limen, an open-source plugin-first auth library. tags: go, webdev, opensource, authentication cover_image: https://res.cloudinary.com/giantdrunkenbird/image/upload/v1777407801/Limen_Banner_5_xkf0ok.png
There’s been a noticeable shift in how authentication is approached in modern apps. Tools like Better Auth have pushed toward a model that is both developer-friendly and production-aware, with a strong emphasis on correctness, extensibility, and sensible defaults.
But if you’re working in Go, that experience hasn’t really existed.
That gap is what led to Limen.
Limen is a composable authentication library for Go, designed to integrate directly into your application rather than sit beside it as a separate service.
It is open source, publicly released, and available here:
The goal is to make authentication easier to add to Go backends without forcing you into a specific framework or application structure.
Go has no shortage of authentication libraries. There are JWT helpers, OAuth clients, and frameworks that cover parts of the problem. But most of them fall into one of two categories:
What’s often missing is a composable, production-ready system that:
This is the space Better Auth occupies in the JavaScript ecosystem. The goal with Limen is not to replicate it exactly, but to bring that level of design and usability into Go.
Limen is built around a plugin-first approach.
Instead of shipping every auth method as one large package, auth methods live as separate Go modules. You import the pieces you need and leave out the ones you do not.
For example, a basic setup can use the core package, a database adapter, and the credential/password plugin:
go get github.com/thecodearcher/limen
go get github.com/thecodearcher/limen/adapters/gorm
go get github.com/thecodearcher/limen/plugins/credential-password
Then you configure Limen inside your Go app:
auth, err := limen.New(&limen.Config{
BaseURL: "http://localhost:8080",
Database: gormadapter.New(db),
Plugins: []limen.Plugin{
credentialpassword.New(),
},
})
And mount it with your existing HTTP setup:
mux := http.NewServeMux()
mux.Handle("/api/auth/", auth.Handler())
That is the main idea: Limen should fit into your app, not dictate it.
The first public release includes support for:
It works with anything that speaks http.Handler, including net/http, Gin, Chi, and Echo.
One thing I wanted to avoid was building an auth system that assumes too much about the application around it.
Limen is designed to work with your existing Go backend.
You bring your own database. You bring your own framework. You choose the plugins you need.
That makes it useful whether you are building a small API, a SaaS backend, or something more custom.
Hosted auth providers are great for many teams.
But sometimes you want authentication to live inside your own application. Maybe you want more control over the data model. Maybe you want to keep your backend self-contained. Maybe you just prefer owning that part of your stack.
Limen is for that kind of project.
It gives you a foundation without making auth feel like a separate product bolted onto your app.
Limen is ready to use today and still improving. That means the API will continue to evolve, the documentation will get better, and more plugins and adapters will be added over time.
You can check it out here:
aiMost of us have seen a coding agent fail to complete a task we know it can do. We just don't...
googlecloudWhen building Generative AI applications, developers often encounter a massive bottleneck: sequential...
discussI’ve been thinking about sharing some electronic circuit posts on Dev.to — small circuits, DIY...
agentsWhat nobody tells you about exporting your multi-agent prototype to a local workspace. Every...
agenticarchitectAutonomous agents are genuinely good at answering messy business questions. Give one an LLM and a set...
aiPR volume went up, ticket quality didn't, and the gap got filled with LLMs on both sides of the review: bots reviewing, bots replying, bots occasionally arguing with bots about priorities that only existed in a teammate's head. Our CEO named the actual problem, and it's bigger than code review.
Workflows from the Neura Market marketplace related to this Stable Diffusion resource