bobmatnyc/claude-mpm-skills376 installs
better-auth-authentication
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.
How do I install this agent skill?
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill better-auth-authenticationIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides documentation and code examples for implementing authentication using the Better Auth library. It follows security best practices by recommending the use of environment variables for secrets and contains no malicious code or risky patterns.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
4/4 files flagged
What does this agent skill do?
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
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/bobmatnyc/claude-mpm-skills/better-auth-authentication">View better-auth-authentication on skillZs</a>