mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-05 20:15:31 -04:00
5a1636baa3
- Replace Biome with oxlint + oxfmt (OXC toolchain) for linting and formatting - Add .oxlintrc.json and .oxfmtrc.json configuration files - Update VS Code settings and devcontainer to use oxc-vscode extension - Remove contact form, Resend email integration, and related server action/schema - Remove unused UI components (accordion, alert, card, tabs, toggle, etc.)
28 lines
797 B
TypeScript
28 lines
797 B
TypeScript
import { type BetterAuthOptions, betterAuth } from "better-auth";
|
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
import { nextCookies } from "better-auth/next-js";
|
|
|
|
import { db } from "@/lib/db";
|
|
import * as schema from "@/lib/db/schema";
|
|
|
|
export const auth = betterAuth({
|
|
baseURL: process.env.NEXT_PUBLIC_BASE_URL,
|
|
database: drizzleAdapter(db, {
|
|
provider: "pg",
|
|
schema,
|
|
}),
|
|
plugins: [nextCookies()],
|
|
socialProviders: {
|
|
github: {
|
|
clientId: process.env.AUTH_GITHUB_CLIENT_ID!,
|
|
clientSecret: process.env.AUTH_GITHUB_CLIENT_SECRET!,
|
|
mapProfileToUser: (profile) => ({
|
|
name: profile.login,
|
|
email: profile.email,
|
|
emailVerified: true,
|
|
image: profile.avatar_url,
|
|
}),
|
|
},
|
|
},
|
|
} satisfies BetterAuthOptions);
|