MIT License

项目介绍

thecodearcher/limen 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 MIT License 许可证,目前获得 562 个 Star、27 次 Fork。

仓库全名
thecodearcher/limen
开源许可证
MIT License
Star 数
562
Fork 数
27
未关闭 Issue
7

README 摘要

A modern, composable authentication library for Go, inspired by better-auth . Documentation · Issues · X (@limenauth) Limen is a modular authentication library for Go that takes a plugin-first approach — the core ships with interfaces, session management, and security primitives, while every authentication method lives in its own importable Go module. You compose exactly the auth stack your application needs without…

完整内容见 GitHub 原始 README 或本页 。

常见问题

limen 用什么语言开发?

主要使用 Go 编写,采用 MIT License 许可证,目前有 562 个 Star。

limen 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 limen 的源码?

可以直接克隆仓库:git clone https://github.com/thecodearcher/limen.git,默认分支为 master;安装与运行步骤见仓库 README。

limen 最近还在维护吗?

仓库最近一次更新为 9月25日,当前有 7 个未关闭 Issue;Star 数为 562,可作为社区活跃度的参考。

关于

Modern, composable authentication for Go

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
621
价值分
345
活跃状态
活跃

语言占比

Go
JavaScript
TypeScript

Release

README

Limen — Composable authentication for Go

A modern, composable authentication library for Go, inspired by better-auth.

Documentation · Issues · X (@limenauth)

Go reference npm version GitHub stars

Limen is a modular authentication library for Go that takes a plugin-first approach — the core ships with interfaces, session management, and security primitives, while every authentication method lives in its own importable Go module. You compose exactly the auth stack your application needs without pulling in code/dependencies you don’t use.

Out of the box, Limen provides:

  • Credential/password authentication
  • OAuth 2.0
  • Two-factor authentication
  • Session management
  • …and more

Bring your own database, bring your own framework — Limen adapts to your stack, not the other way around.

Documentation

Full guides, configuration reference, and plugin documentation are available at limenauth.dev.

Requirements

  • Go 1.25+

Installation

go get github.com/thecodearcher/limen

Then add the adapter and plugins your application needs:

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

Quick Start

package main

import (
	"log"
	"net/http"

	"gorm.io/driver/postgres"
	"gorm.io/gorm"

	"github.com/thecodearcher/limen"
	gormadapter "github.com/thecodearcher/limen/adapters/gorm"
	credentialpassword "github.com/thecodearcher/limen/plugins/credential-password"
)

func main() {
	db, err := gorm.Open(postgres.Open("your-dsn"), &gorm.Config{})
	if err != nil {
		log.Fatal(err)
	}

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

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

	log.Println("listening on :8080")
	log.Fatal(http.ListenAndServe(":8080", mux))
}

Alternatively, set the LIMEN_SECRET environment variable and omit the Secret from the struct.

For a more complete example with OAuth providers, two-factor auth, and Gin integration, see the examples.

For full configuration options, usage, and plugin APIs, visit limenauth.dev.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Curious what’s being built, what’s open for contribution, and what’s out of scope? See ROADMAP.md. If you’re planning to contribute, check there and open an issue first.

Security

Found a security issue? Please do not open a public issue. Email [email protected] instead. See SECURITY.md for full details on our disclosure process.

License

MIT License — see LICENSE for details.

评论

暂无评论