← スキル一覧に戻る

better-auth-authentication
by bobmatnyc
Curated collection of Claude Code skills for intelligent project development with progressive loading and toolchain detection
⭐ 7🍴 2📅 2026年1月22日
SKILL.md
name: better-auth-authentication description: Better Auth authentication flows for TypeScript apps. Use when enabling email/password auth, configuring social providers, or implementing sign-up, sign-in, and verification flows. progressive_disclosure: entry_point: summary: "Better Auth authentication flows for TypeScript apps. Use when enabling email/password auth, configuring social providers, or implementing sign-up, sign-in, and verification flows." when_to_use: "When implementing authentication, authorization, or security." quick_start: "1. Review the core concepts below. 2. Apply patterns to your use case. 3. Follow best practices for implementation." references: - email-password.md - providers.md
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
- Enable
emailAndPasswordand configuresocialProviders. - Create a client with
createAuthClient. - Use
signUp.email,signIn.email,signIn.social, andsignOuton 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();
Email verification
- Provide
emailVerification.sendVerificationEmailto send the verification link. - Use
emailAndPassword.requireEmailVerificationto enforce verification before sign-in.
Social providers
- Configure providers in
socialProviderswith provider-specific credentials. - Use
signIn.socialto start OAuth flows. - Pass
callbackURL,errorCallbackURL, andnewUserCallbackURLfor redirects.
Guardrails
- Call client methods from the client only.
- Keep secrets in server-only env variables.
- Use
rememberMeto control persistent sessions on email/password sign-in.
References
toolchains/platforms/auth/better-auth/better-auth-authentication/references/email-password.mdtoolchains/platforms/auth/better-auth/better-auth-authentication/references/providers.md
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です