关于 better-auth
better-auth 是面向 Better Auth 框架的参考技能,涵盖 TypeScript 项目中的认证与授权。它根据任务将查询引导至分类文档,包括初始设置、集成、适配器、插件、迁移和 API 详情。
主要功能
- 01按任务查找文档类别
- 02提供设置与核心概念指南
- 03涵盖数据库适配器和框架集成
- 04介绍认证提供方与插件
- 05提供迁移和配置参考
- 06包含示例与 CLI 文档
适用场景
- 01查找 Better Auth 项目的设置指南
- 02查询框架集成或数据库适配器
- 03查看提供方、插件或认证选项
- 04规划升级或迁移
MCP 相关
参考索引包含 MCP 认证和 Agent 认证主题的文档;未说明它是 MCP 服务或客户端。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ fandhe-ai/ agent-reference-skills --skill better-auth安装后在 Claude Code 中输入/better-auth确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/adapters/community-adapters.mddrizzle.mdmongodb.mdmssql.mdmysql.mdother-relational.mdpostgresql.mdprisma.mdREADME.mdsqlite.mdreferences/authentication/email-password.mdother-social-providers.mdREADME.mdsocial-apple.mdsocial-atlassian.mdsocial-cloudflare.mdsocial-cognito.mdsocial-discord.mdsocial-dropbox.mdsocial-facebook.mdsocial-figma.mdsocial-github.mdsocial-gitlab.mdsocial-google.mdsocial-huggingface.mdsocial-kakao.mdsocial-kick.mdsocial-line.mdsocial-linear.mdsocial-linkedin.md详细介绍
Better Auth API 参考文档
Better Auth — 面向 TypeScript 的框架无关型认证与授权框架。
适用于 Better Auth v1.7.10(文档:GitHub tag v1.7.10,获取于 2026-10-17)。从 1.6 迁移请参阅 references/guides/1-7-upgrade-guide.md。
根据用户的任务读取相应的 README.md,然后从中找到具体文件。
目录结构
skills/better-auth/
SKILL.md
references/
getting-started/
README.md
installation.md
basic-usage.md
concepts/
README.md
api.md
cli.md
client.md
cookies.md
database.md
dynamic-base-url.md
email.md
hooks.md
oauth.md
plugins.md
rate-limit.md
session-management.md
typescript.md
users-accounts.md
adapters/
README.md
community-adapters.md
drizzle.md
mongodb.md
mssql.md
mysql.md
other-relational.md
postgresql.md
prisma.md
sqlite.md
integrations/
README.md
astro.md
convex.md
electron.md
elysia.md
encore.md
expo.md
express.md
fastify.md
hono.md
lynx.md
nestjs.md
next.md
nitro.md
nuxt.md
react-router.md
solid-start.md
svelte-kit.md
tanstack.md
waku.md
effect.md
examples/
README.md
astro.md
next-js.md
nuxt.md
react-router.md
svelte-kit.md
authentication/
README.md
email-password.md
social-providers-common.md
other-social-providers.md
social-apple.md
social-atlassian.md
social-cloudflare.md
social-cognito.md
social-discord.md
social-dropbox.md
social-facebook.md
social-figma.md
social-github.md
social-gitlab.md
social-google.md
social-huggingface.md
social-kakao.md
social-kick.md
social-line.md
social-linear.md
social-linkedin.md
social-microsoft.md
social-naver.md
social-notion.md
social-paybin.md
social-paypal.md
social-polar.md
social-railway.md
social-reddit.md
social-roblox.md
social-salesforce.md
social-slack.md
social-spotify.md
social-tiktok.md
social-twitch.md
social-twitter.md
social-vercel.md
social-vk.md
social-wechat.md
social-zoom.md
plugins/
README.md
admin.md
agent-auth.md
anonymous.md
api-key.md
api-key-advanced.md
api-key-reference.md
autumn.md
bearer.md
captcha.md
chargebee.md
cimd.md
commet.md
community-plugins.md
creem.md
device-authorization.md
dodopayments.md
dub.md
email-otp.md
generic-oauth.md
have-i-been-pwned.md
i18n.md
jwt.md
last-login-method.md
magic-link.md
mcp.md
multi-session.md
oauth-provider.md
oauth-proxy.md
oidc-provider.md
one-tap.md
one-time-token.md
open-api.md
organization.md
passkey.md
phone-number.md
polar.md
scim.md
scim-groups-and-roles.md
scim-reference.md
siwe.md
sso.md
stripe.md
test-utils.md
two-factor.md
username.md
infrastructure/
README.md
introduction.md
getting-started.md
dashboard.md
audit-logs.md
sentinel.md
email-service.md
sms-service.md
reference/
README.md
contributing.md
options.md
resources.md
security.md
faq.md
instrumentation.md
telemetry.md
errors.md
error-account-already-linked.md
error-account-not-linked.md
error-email-doesnt-match.md
error-email-not-found.md
error-internal-server-error.md
error-invalid-callback-request.md
error-invalid-code.md
error-no-callback-url.md
error-no-code.md
error-oauth-provider-not-found.md
error-signup-disabled.md
error-state-invalid.md
error-state-mismatch.md
error-state-not-found.md
error-unable-to-create-session.md
error-unable-to-create-user.md
error-unable-to-get-user-info.md
error-unable-to-link-account.md
error-unknown.md
guides/
README.md
1-7-upgrade-guide.md
auth0-migration.md
browser-extension.md
clerk-migration.md
create-a-db-adapter.md
dynamic-base-url.md
next-auth-migration.md
optimizing-for-performance.md
saml-sso-with-okta.md
supabase-migration.md
workos-migration.md
your-first-plugin.md
samples/
README.md
astro.md
client-setup.md
convex.md
electron.md
elysia.md
email-password-auth.md
email-verification.md
encore.md
expo.md
express.md
fastify.md
hono.md
hooks.md
lynx.md
mcp-server.md
nestjs.md
next.md
nitro.md
nuxt.md
password-reset.md
react-router.md
server-setup.md
session-management.md
sign-out.md
social-sign-in.md
solid-start.md
svelte-kit.md
tanstack.md
two-factor-auth.md
user-management.md
waku.md
scripts/
README.md
cli.md
generate.md
install.md
探索步骤
根据任务确定类别,再通过该类别的 README.md 找到目标页面:
- 在下方映射表中查找与任务对应的类别
- 参阅该类别的
references/{category}/README.md,确定目标页面 - 读取相应的
.md页面,查看详细信息
任务 → 类别映射
| 任务 | 类别 | 参考 README |
|---|---|---|
| 安装、初始设置、创建 auth 实例 | getting-started | references/getting-started/README.md |
| 基本认证模式、邮件/密码、获取会话的概述 | getting-started | references/getting-started/README.md |
| auth.api、客户端、会话管理、Cookie、DB、钩子、速率限制 | concepts | references/concepts/README.md |
| OAuth 流程、类型安全、插件概念、动态基础 URL | concepts | references/concepts/README.md |
| Prisma / Drizzle / MongoDB / SQLite / PostgreSQL / MySQL 等 DB 适配器 | adapters | references/adapters/README.md |
| 社区开发的第三方 DB 适配器 | adapters | references/adapters/README.md |
| Next.js / Nuxt / SvelteKit / Hono / Express / Fastify / Expo 等框架集成 | integrations | references/integrations/README.md |
| Astro / React Router / TanStack / Convex / Electron / NestJS 等集成指南 | integrations | references/integrations/README.md |
| 官方分步教程示例(Astro、Next.js、Nuxt、React Router、SvelteKit) | examples | references/examples/README.md |
| Email/Password 认证、社交登录(GitHub、Google、Apple 等) | authentication | references/authentication/README.md |
| 特定社交提供商(Discord、Microsoft、LINE、Twitter 等)的设置 | authentication | references/authentication/README.md |
| 2FA (TOTP)、通行密钥、魔法链接、SMS OTP、匿名认证 | plugins | references/plugins/README.md |
| Organization、Admin、SSO、SCIM、API Key、JWT、Bearer 令牌 | plugins | references/plugins/README.md |
| Stripe / Chargebee / Polar / Autumn 等计费和订阅集成 | plugins | references/plugins/README.md |
| MCP 认证、Agent 认证、SIWE、验证码、密码泄露检查 | plugins | references/plugins/README.md |
| 想查看社区插件列表 | plugins | references/plugins/README.md |
| 构建 OAuth 2.1 / OIDC 提供商、CIMD、DPoP | plugins | references/plugins/README.md |
| SCIM 的 groups、roles、reference | plugins | references/plugins/README.md |
| Effect HTTP server 集成 | integrations | references/integrations/README.md |
| Better Auth Infrastructure(付费;@better-auth/infra 的 dash / sentinel、audit logs、managed email / SMS) | infrastructure | references/infrastructure/README.md |
| 配置选项列表、安全指南、FAQ | reference | references/reference/README.md |
| 调查错误代码、OpenTelemetry、遥测 | reference | references/reference/README.md |
| 贡献指南、社区视频/博客等资源集 | reference | references/reference/README.md |
| 从 1.6 升级到 1.7、破坏性更改(npx auth upgrade) | guides | references/guides/README.md |
| 从 Auth.js (NextAuth) / Auth0 / Clerk / Supabase / WorkOS 迁移 | guides | references/guides/README.md |
| 创建自定义插件、自定义 DB 适配器、性能优化 | guides | references/guides/README.md |
| SAML SSO (Okta)、浏览器扩展集成、动态基础 URL 详情 | guides | references/guides/README.md |
| 典型用法、可运行的代码示例、各框架的设置片段 | samples | samples/README.md |
| 想了解安装命令、CLI 命令、架构生成 | scripts | scripts/README.md |
评论
支持 Markdown