* chore: migration to SvelteKit 2 * stage 1: migrate to svelte 5 and fix rerendering issues * stage 2: fix more $: reactivity across dashboard * fix merge conflicts * chore: migrate code in main to svelte 5 * chore: update preventDefault * chore: simplify tsconfig and remove unused mobileMenuRef in MobileMenu.svelte * chore: enforce .ts across dashboard * rename from classroomio-com to website * stage-3: Replace carbon icon svelte with lucide icon * update lock file * chore: finish icon replacement * fix: settings and setup page multiple rerender * stage 3: More icon and rerendering fixes * feat: setup drizzle and better auth * fix: onboarding validation error showing translation key #586 (#593) * fix: onboarding validation error showing translation key #586 * fix: remove debug log for profile update errors * chore: add a clean command * fix: remove message from email verification response
26 lines
594 B
TypeScript
26 lines
594 B
TypeScript
import * as schema from '@db/schema';
|
|
|
|
import { admin, anonymous } from 'better-auth/plugins';
|
|
|
|
import { betterAuth } from 'better-auth';
|
|
import { db } from '@db/drizzle';
|
|
import { drizzleAdapter } from 'better-auth/adapters/drizzle';
|
|
|
|
export const auth = betterAuth({
|
|
database: drizzleAdapter(db, {
|
|
provider: 'pg',
|
|
schema
|
|
}),
|
|
emailVerification: {},
|
|
emailAndPassword: {
|
|
enabled: true
|
|
},
|
|
socialProviders: {
|
|
google: {
|
|
clientId: process.env.GOOGLE_CLIENT_ID!,
|
|
clientSecret: process.env.GOOGLE_CLIENT_SECRET!
|
|
}
|
|
},
|
|
plugins: [admin(), anonymous()]
|
|
});
|