Skip to content
bobmatnyc avatar

Better Auth Authentication

Authentication flow guide for Better Auth covering email/password, social providers, and verification in TypeScript.

CCM score
51 of 100
skills.sh installs
416
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers server setup with betterAuth and client calls for sign-up, sign-in, social OAuth, and sign-out
  • Includes two reference files, email-password.md and providers.md, for detailed provider and password flows
  • Configures email verification via emailVerification.sendVerificationEmail and can require it before sign-in
  • Guides redirect handling with callbackURL, errorCallbackURL, and newUserCallbackURL, and enforces client-only calls with secrets kept server-side

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill better-auth-authentication -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Better Auth Authentication

Goals

  • Enable email/password authentication and social providers.
  • Implement sign-up, sign-in, sign-out, and verification flows.
  • Handle redirects and errors consistently.

Quick start

  1. Enable emailAndPassword and configure socialProviders.
  2. Create a client with createAuthClient.
  3. Use signUp.email, signIn.email, signIn.social, and signOut on the client.
import { betterAuth } from "better-auth";

export const auth = betterAuth({
  emailAndPassword: { enabled: true },
  socialProviders: {
    github: {
      clientId: process.env.GITHUB_CLIENT_ID as string,
      clientSecret: process.env.GITHUB_CLIENT_SECRET as string,
    },
  },
});
import { createAuthClient } from "better-auth/client";

const authClient = createAuthClient();

await authClient.signUp.email({
  email,
  password,
  name,
});

await authClient.signIn.email({
  email,
  password,
  callbackURL: "/dashboard",
});

await authClient.signIn.social({
  provider: "github",
  callbackURL: "/dashboard",
});

await authClient.signOut();

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Backend & APIs
First seen
Jun 3, 2026

Questions

What does the better-auth-authentication skill do?

better-auth-authentication gives the agent Better Auth flows for TypeScript apps, covering email and password auth, social providers, and sign-up, sign-in and verification flows. It shows how to enable emailAndPassword and configure socialProviders on the server, then call signUp.email, signIn.email, signIn.social and signOut from the client. It also explains email verification and how to handle redirects and errors.

How do I install the better-auth-authentication skill?

Run npx -y skills add bobmatnyc/claude-mpm-skills --skill better-auth-authentication -y in your project to install better-auth-authentication. Once installed, the agent can apply its Better Auth patterns when you add authentication to a TypeScript app.

What does better-auth-authentication need to work?

better-auth-authentication expects a TypeScript app that uses Better Auth, and it assumes GitHub OAuth credentials, GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET, are kept as server-only environment variables. Its guardrails say to call client methods only from the client. Add the environment variables before you set up the social provider.

Where does better-auth-authentication sit in the Backend and APIs category?

better-auth-authentication is listed under Backend and APIs with entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. Its focus is narrower than those, since it covers only Better Auth sign-up, sign-in and verification flows in TypeScript apps.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Better Auth Authentication

More Backend & APIs