Limen

Composable authentication for modern Go backends

The Authentication Library for Go

$
Go
main.go
package main

func main() {
	auth, err := limen.New(
    &limen.Config{
		Database: adapter.New(db),
		Plugins: []limen.Plugin{
        credentialpassword.New(),
      }
    }
  )

	if err != nil {
		log.Fatal(err)
	}

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

Limen is a lightweight, composable authentication and authorization library for Go

Composable

Import only the auth methods you use as separate Go modules.

Secure by default

Signed cookies, CSRF protection, origin allowlists, and built-in rate limiting.

Idiomatic Go

Works with net/http, Gin, Chi, Echo — anything that speaks http.Handler.

Go
main.go
package main

import (...)

func main() {
  auth, err := limen.New(&limen.Config{
    BaseURL:  "http://localhost:8080",
    Database: adapter.New(db),
    Plugins: []limen.Plugin{
      credentialpassword.New(),
    },
  })
  if err != nil {
    log.Fatal(err)
  }

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

Don't reinvent the Auth wheel

Sessions, password hashing, OAuth, CSRF — the parts you keep rewriting in every project. Install Limen in your Go backend, call it from any client, and move on.

Read the docs

Auth that fits how you build with Go

Comprehensive auth methods

Ship the login experience your users expect, without gluing libraries together.

  • Email & password
  • OAuth & social
  • Two-factor auth...and more

Seamless auth for Go backends

Secure any Go HTTP service without writing auth from scratch.

  • Drop-in auth routes
  • Session management
  • Helpers for building your own auth flows

Bring your own database

One auth core that adapts to your Go stack, not the other way around.

  • Adapters for your database of choice
  • Customizable and extensible schema
  • Plug in your own database adapter

Ready to get started?

Join other developers using Limen to secure their Go applications with production-ready authentication.