{"id":45884116,"url":"https://github.com/CaoMeiYouRen/caomei-auth","last_synced_at":"2026-03-13T02:01:18.924Z","repository":{"id":302251042,"uuid":"1011021859","full_name":"CaoMeiYouRen/caomei-auth","owner":"CaoMeiYouRen","description":"草梅 Auth 是一个基于 Nuxt 全栈框架的统一登录平台。支持 OAuth2.0 协议，集成邮箱、用户名、手机号、验证码、社交媒体等多种登录注册方式。","archived":false,"fork":false,"pushed_at":"2026-03-08T20:10:37.000Z","size":6997,"stargazers_count":216,"open_issues_count":3,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-09T00:27:38.673Z","etag":null,"topics":["authorization","oauth2","social-login","sso","unified-login","user-management"],"latest_commit_sha":null,"homepage":"https://auth-demo.cmyr.dev/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CaoMeiYouRen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"custom":["https://afdian.com/a/CaoMeiYouRen"]}},"created_at":"2025-06-30T07:27:54.000Z","updated_at":"2026-03-08T20:10:33.000Z","dependencies_parsed_at":"2025-07-24T15:07:11.654Z","dependency_job_id":"38d9c5ec-549d-414c-a273-cac138db2126","html_url":"https://github.com/CaoMeiYouRen/caomei-auth","commit_stats":null,"previous_names":["caomeiyouren/caomei-auth"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/CaoMeiYouRen/caomei-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fcaomei-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fcaomei-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fcaomei-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fcaomei-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaoMeiYouRen","download_url":"https://codeload.github.com/CaoMeiYouRen/caomei-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaoMeiYouRen%2Fcaomei-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30454982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"online","status_checked_at":"2026-03-13T02:00:07.565Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","oauth2","social-login","sso","unified-login","user-management"],"created_at":"2026-02-27T15:00:30.027Z","updated_at":"2026-03-13T02:01:18.918Z","avatar_url":"https://github.com/CaoMeiYouRen.png","language":"TypeScript","funding_links":["https://afdian.com/a/CaoMeiYouRen"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/CaoMeiYouRen/caomei-auth/master/public/logo.png\" alt=\"Caomei Auth\" width=\"120\" height=\"120\"\u003e\n  \u003cbr\u003e\n  Caomei Auth\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e统一登录平台 · OAuth2.0 · 多因子认证 · 社交登录\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/github/package-json/v/CaoMeiYouRen/caomei-auth.svg\" /\u003e\n  \u003ca href=\"https://hub.docker.com/r/caomeiyouren/caomei-auth\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Docker Pulls\" src=\"https://img.shields.io/docker/pulls/caomeiyouren/caomei-auth\"\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://app.codecov.io/gh/CaoMeiYouRen/caomei-auth\" target=\"_blank\"\u003e\n     \u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/CaoMeiYouRen/caomei-auth\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/caomei-auth/actions?query=workflow%3ARelease\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/CaoMeiYouRen/caomei-auth/release.yml?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/node-%3E%3D18-blue.svg\" /\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/caomei-auth#readme\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/caomei-auth/graphs/commit-activity\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CaoMeiYouRen/caomei-auth/blob/master/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/CaoMeiYouRen/caomei-auth?color=yellow\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e 🍓 草梅 Auth 是一个基于 **Nuxt 3** 全栈框架的现代化统一登录平台。支持 **OAuth2.0** 协议，集成多种登录方式，为您的应用提供完整的身份认证解决方案。\n\n## ✨ 特性\n\n-   🔐 **OAuth2.0 协议** - 标准的授权协议，易于集成\n-   🚀 **多种登录方式** - 邮箱、用户名、手机号、验证码、社交媒体登录\n-   🛡️ **安全可靠** - 多因子认证、登录日志、设备管理\n-   📱 **响应式设计** - 完美适配桌面端与移动端\n-   ⚡ **高性能** - 基于 Nuxt 3 的 SSR 渲染\n-   🎨 **现代化 UI** - 基于 PrimeVue 组件库，支持主题定制\n-   🌍 **多种部署方式** - Node.js、Docker、Vercel、Cloudflare Workers\n-   📚 **完整文档** - 详细的 API 文档和集成指南\n\n## 🏠 在线体验\n\n-   **演示站点**: [https://auth-demo.cmyr.dev/](https://auth-demo.cmyr.dev/)\n\n    -   可以通过用户名 `demo_admin`，密码`Demo@123456`登录演示用管理员账号。\n\n-   **正式站点**: [https://auth.cmyr.dev/](https://auth.cmyr.dev/)\n\n    -   您可以注册自己的账号查看用户视角。\n\n-   **文档站点**: [https://auth-docs.cmyr.dev/](https://auth-docs.cmyr.dev/)\n-   **问题反馈和交流群**：请参考该链接中的内容 [#114](https://github.com/CaoMeiYouRen/caomei-auth/issues/114)\n    -   QQ 群: [807530287](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027\u0026k=K3QRQlxv_y7KqLhdEZmfouxKv9WHLN_v\u0026authKey=pfdJX4EkvKGQXQrtM5BR968EbtFc9WnVvz8AtLiSUTGZRgw3P1wBWESSDcEjoCZB\u0026noverify=0\u0026group_code=807530287)\n    -   Discord: [草梅友仁的交流群](https://discord.gg/6bfPevfyr6)\n\n希望试用基于 `草梅 Auth` 的第三方登录功能？\n\n-   **afdian-linker**: [https://afdian.cmyr.dev/](https://afdian.cmyr.dev/)\n\n**页面截图**\n\n![image-20250720201256684](https://oss.cmyr.dev/images/20250720201256857.png)\n\n![image-20250807233209195](https://oss.cmyr.dev/images/20250807233216397.png)\n\n![image-20250803195105231](https://oss.cmyr.dev/images/20250803195112443.png)\n\n## 🚀 快速开始\n\n-   **项目规范**: [docs/standards/development.md](docs/standards/development.md)\n-   **部署指南**: [docs/deployment/index.md](docs/deployment/index.md)\n-   **开发文档**: [docs/development/index.md](docs/development/index.md)\n-   **详细文档**: [docs/index.md](docs/index.md)\n\n### 环境要求\n\n-   Node.js \u003e= 18\n-   数据库：PostgreSQL / MySQL / SQLite\n-   PNPM（推荐）\n\n### 安装\n\n```bash\n# 克隆项目\ngit clone https://github.com/CaoMeiYouRen/caomei-auth.git\ncd caomei-auth\n\n# 安装依赖（推荐使用 pnpm）\npnpm install\n\n# 配置环境变量\ncp .env.example .env\n# 编辑 .env 文件，配置数据库连接等\n\n# 启动开发服务器\npnpm dev\n```\n\n访问 [http://localhost:3000](http://localhost:3000) 查看应用\n\n### 生产部署\n\n```bash\n# 构建生产版本\npnpm build\n\n# 启动生产服务器\npnpm preview\n```\n\n## 🛠️ 技术栈\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003e技术分类\u003c/th\u003e\n      \u003cth\u003e使用技术\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003e前端框架\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eVue 3, Nuxt 3\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003eUI 组件库\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003ePrimeVue, @mdi/font\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003e认证框架\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eBetter Auth\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003e数据库\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003ePostgreSQL, MySQL, SQLite\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003eORM\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eTypeORM\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003e样式预处理\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eSCSS\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003e包管理器\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003ePNPM\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003e类型检查\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eTypeScript\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## 📋 功能列表\n\n### 🔐 认证功能\n\n-   ✅ 邮箱 + 密码登录\n-   ✅ 用户名 + 密码登录\n-   ✅ 手机号 + 密码登录\n-   ✅ 邮箱验证码登录\n-   ✅ 短信验证码登录\n-   ✅ 社交媒体登录（GitHub、Google、Microsoft 等）\n-   ✅ 多因子认证（MFA）\n-   ✅ OAuth2.0 授权\n-   ✅ SSO 单点登录\n\n### 👤 用户管理\n\n-   ✅ 用户注册/登录\n-   ✅ 个人资料管理\n-   ✅ 密码修改\n-   ✅ 账号安全设置\n-   ✅ 登录日志查看\n-   ✅ 设备管理\n\n### 🔧 管理后台\n\n-   ✅ 用户管理\n-   ✅ OAuth 应用管理\n-   ✅ 登录统计分析\n-   ✅ 系统配置\n\n### 📱 其他功能\n\n-   ✅ 响应式设计\n-   ✅ 多种部署方式\n-   ✅ 完整的 API 文档\n-   🚧 多语言支持（开发中）\n-   🚧 无障碍适配（开发中）\n\n## 🆚 为什么选择草梅 Auth？\n\n### 与其他认证方案的对比\n\n| 对比维度        | 草梅 Auth     | Auth0/Firebase | Keycloak    | 自建系统      |\n| --------------- | ------------- | -------------- | ----------- | ------------- |\n| 📊 **数据掌控** | ✅ 完全掌控   | ❌ 第三方托管  | ✅ 自主掌控 | ✅ 完全掌控   |\n| 💰 **成本效益** | ✅ 无用户费用 | ❌ 按用户计费  | ✅ 免费开源 | ⚠️ 开发成本高 |\n| 🚀 **开发效率** | ✅ 开箱即用   | ✅ 快速集成    | ⚠️ 配置复杂 | ❌ 从零开发   |\n| 🛠️ **定制能力** | ✅ 深度定制   | ⚠️ 有限定制    | ✅ 高度可配 | ✅ 完全定制   |\n| 🔧 **运维负担** | ✅ 轻量运维   | ✅ 零运维      | ❌ 重度运维 | ❌ 全面运维   |\n\n### 🎯 核心优势\n\n-   **🏗️ 全栈一体化** - 基于 Nuxt 3，前后端统一，开发体验佳\n-   **💾 数据自主权** - 用户数据存储在您的数据库中，完全掌控\n-   **💸 成本优势** - 无按用户计费，大规模应用成本更低\n-   **🔒 企业级安全** - 内置双因子认证、审计日志、会话管理\n-   **🚀 现代化技术** - TypeScript + Better Auth + PrimeVue\n\n**了解更多对比详情：** [📊 详细方案对比](https://auth-docs.cmyr.dev/docs/usage/comparison)\n\n## 📖 文档\n\n-   [📚 完整文档](https://auth-docs.cmyr.dev/)\n-   [🚀 快速开始](https://auth-docs.cmyr.dev/docs/usage/getting-started)\n-   [🆚 方案对比](https://auth-docs.cmyr.dev/docs/usage/comparison)\n-   [🔌 API 文档](https://auth-docs.cmyr.dev/docs/api/)\n-   [🛠️ 部署指南](https://auth-docs.cmyr.dev/docs/deployment/)\n-   [📖 开发指南](https://auth-docs.cmyr.dev/docs/development/)\n\n## 🔧 开发命令\n\n```bash\n# 开发\npnpm dev              # 启动开发服务器\npnpm build           # 构建生产版本\npnpm generate        # 生成静态站点\npnpm preview         # 预览生产版本\n\n# 代码质量\npnpm lint            # ESLint 代码检查\npnpm lint:css        # Stylelint 样式检查\npnpm test            # 运行测试\npnpm test:coverage   # 运行测试并生成覆盖率报告\n\n# 文档\npnpm docs:dev        # 启动文档开发服务器\npnpm docs:build      # 构建文档\npnpm docs:preview    # 预览文档\n\n# 其他\npnpm commit          # 标准化提交\n```\n\n## 🔄 部署\n\n### Docker 部署\n\n```bash\n# 使用 Docker Compose\ndocker-compose up -d\n\n# 或者使用 Docker\ndocker build -t caomei-auth .\ndocker run -p 3000:3000 caomei-auth\n```\n\n### Vercel 部署\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FCaoMeiYouRen%2Fcaomei-auth)\n\n### Cloudflare Workers 部署（开发中）\n\n即将支持部署到 Cloudflare Workers，敬请期待。\n\n## 🤝 贡献\n\n我们非常欢迎各种形式的贡献！\n\n### 如何贡献\n\n1. Fork 这个项目\n2. 创建你的功能分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交你的更改 (`git commit -m 'Add some AmazingFeature'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 打开一个 Pull Request\n\n### 报告问题\n\n如果你发现了问题或有新的功能建议，请 [创建 Issue](https://github.com/CaoMeiYouRen/caomei-auth/issues)。\n\n详细的贡献指南请查看 [CONTRIBUTING.md](./CONTRIBUTING.md)。\n\n## 📄 许可证\n\n**本项目的 Logo 不在 License 协议范围内，图片版权由项目所有者 [CaoMeiYouRen](https://github.com/CaoMeiYouRen) 保留。如要进行商业化使用，需更换 Logo。非商业化使用的情况允许在不影响项目所有者权益的情况下使用。**\n\n本项目采用 [MIT](./LICENSE) 许可证。\n\n## 👤 作者\n\n**CaoMeiYouRen**\n\n-   🌐 Website: [https://blog.cmyr.ltd/](https://blog.cmyr.ltd/)\n-   🐙 GitHub: [@CaoMeiYouRen](https://github.com/CaoMeiYouRen)\n\n## 💰 支持作者\n\n如果这个项目对你有帮助，请给一个 ⭐️，非常感谢！\n\n你也可以通过以下方式支持作者：\n\n\u003ca href=\"https://afdian.com/@CaoMeiYouRen\"\u003e\n  \u003cimg src=\"https://oss.cmyr.dev/images/202306192324870.png\" width=\"312px\" height=\"78px\" alt=\"在爱发电支持我\"\u003e\n\u003c/a\u003e\n\n## 🌟 Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=CaoMeiYouRen/caomei-auth\u0026type=Date)](https://star-history.com/#CaoMeiYouRen/caomei-auth\u0026Date)\n\n## 🏆 Contributors\n\n感谢所有为这个项目做出贡献的开发者：\n\n\u003ca href=\"https://github.com/CaoMeiYouRen/caomei-auth/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=CaoMeiYouRen/caomei-auth\" /\u003e\n\u003c/a\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eMade with ❤️ by \u003ca href=\"https://github.com/CaoMeiYouRen\"\u003eCaoMeiYouRen\u003c/a\u003e\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003e\n    如果你喜欢这个项目，请给它一个 ⭐️！\u003cbr\u003e\n    Copyright © 2025 \u003ca href=\"https://github.com/CaoMeiYouRen\"\u003eCaoMeiYouRen\u003c/a\u003e\n  \u003c/sub\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCaoMeiYouRen%2Fcaomei-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCaoMeiYouRen%2Fcaomei-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCaoMeiYouRen%2Fcaomei-auth/lists"}