nextjs-auth-starter
Version:
CLI tool to set up Next.js authentication with better-auth, PostgreSQL, and Drizzle ORM. Usage: npx nextjs-auth-starter init
18 lines (15 loc) • 349 B
text/typescript
import { createAuthClient } from "better-auth/react";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_BETTER_AUTH_URL || "http://localhost:3000",
});
export const {
signIn,
signUp,
signOut,
useSession,
getSession,
sendVerificationEmail,
verifyEmail,
resetPassword,
changePassword,
} = authClient;