Loading...
Loading...
Better Auth plugin system for TypeScript. Use when adding advanced auth features (2FA, magic link, passkey, username, JWT, organizations) via server and client plugins.
npx skill4agent add bobmatnyc/claude-mpm-skills better-auth-pluginsbetter-auth/pluginspluginsgeneratemigratebetter-auth/client/pluginsimport { betterAuth } from "better-auth";
import { twoFactor } from "better-auth/plugins";
export const auth = betterAuth({
plugins: [twoFactor()],
});import { createAuthClient } from "better-auth/client";
import { twoFactorClient } from "better-auth/client/plugins";
export const authClient = createAuthClient({
plugins: [twoFactorClient({ twoFactorPage: "/two-factor" })],
});npx @better-auth/cli generatenpx @better-auth/cli migratenextCookiestoolchains/platforms/auth/better-auth/better-auth-plugins/references/plugins-index.md