better-auth-integrations by bobmatnyc/claude-mpm-skills
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill better-auth-integrations/api/auth/*(或自定义基础路径)。auth 实例(参见 better-auth-core)。/api/auth/* 添加一个通配路由。auth.handler)返回一个 Response。import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";
export const { GET, POST } = toNextJsHandler(auth);
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
import { auth } from "@/lib/auth";
import { toNodeHandler } from "better-auth/node";
export const config = { api: { bodyParser: false } };
export default toNodeHandler(auth.handler);
使用 nextCookies 插件以确保服务端操作能正确设置 Cookie。
import { betterAuth } from "better-auth";
import { nextCookies } from "better-auth/next-js";
export const auth = betterAuth({
// ...config
plugins: [nextCookies()],
});
toolchains/platforms/auth/better-auth/better-auth-integrations/references/nextjs.mdtoolchains/platforms/auth/better-auth/better-auth-integrations/references/frameworks.md每周安装量
70
代码仓库
GitHub 星标数
18
首次出现
2026年1月23日
安全审计
已安装于
claude-code53
opencode52
codex49
gemini-cli48
cursor47
github-copilot45
/api/auth/* (or a custom base path).auth instance (see better-auth-core)./api/auth/*.auth.handler) to return a Response.import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";
export const { GET, POST } = toNextJsHandler(auth);
import { auth } from "@/lib/auth";
import { toNodeHandler } from "better-auth/node";
export const config = { api: { bodyParser: false } };
export default toNodeHandler(auth.handler);
Use the nextCookies plugin so server actions set cookies correctly.
import { betterAuth } from "better-auth";
import { nextCookies } from "better-auth/next-js";
export const auth = betterAuth({
// ...config
plugins: [nextCookies()],
});
toolchains/platforms/auth/better-auth/better-auth-integrations/references/nextjs.mdtoolchains/platforms/auth/better-auth/better-auth-integrations/references/frameworks.mdWeekly Installs
70
Repository
GitHub Stars
18
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code53
opencode52
codex49
gemini-cli48
cursor47
github-copilot45
Linux云主机安全托管指南:从SSH加固到HTTPS部署
46,900 周安装