惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
小众软件
小众软件
F
Fortinet All Blogs
博客园 - 叶小钗
博客园_首页
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
U
Unit 42
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I couldn’t find Better Auth in Go, so I built one
Brian Iyoha · 2026-04-29 · via DEV Community

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.

What Limen is

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.

Why I built it

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:

  • Low-level primitives that require significant assembly
  • Opinionated frameworks that are hard to extend or adapt

What’s often missing is a composable, production-ready system that:

  • Handles sessions, cookies, and OAuth
  • Lets you extend behavior without rewriting core logic
  • Doesn’t force you into a specific router or framework
  • Works with your existing database setup

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.

How Limen works

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

Enter fullscreen mode Exit fullscreen mode

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(),
    },
})

Enter fullscreen mode Exit fullscreen mode

And mount it with your existing HTTP setup:

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

Enter fullscreen mode Exit fullscreen mode

That is the main idea: Limen should fit into your app, not dictate it.

What it supports today

The first public release includes support for:

  • Credential/password authentication
  • 10+ Social Sign-on providers (and growing)
  • Two-factor authentication
  • Session management
  • Built-in rate limiting
  • Database adapters

It works with anything that speaks http.Handler, including net/http, Gin, Chi, and Echo.

Bring your own stack

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.

Why not just use a hosted auth provider?

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.

Current state

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: