Files
airi/server/apps/auth/src/tooling/auth-config.ts
T
RainbowBirdandautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> 22b5249c64 refactor(server): split independent auth service (#2202)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-12 23:33:58 +08:00

14 lines
491 B
TypeScript

import process from 'node:process'
import { createAuth } from '../auth'
import { createAuthDrizzle } from '../db'
import { parseAuthEnv } from '../env'
const env = parseAuthEnv(process.env)
// NOTICE:
// `better-auth generate` only introspects the auth instance's schema — it never
// fires the email callbacks. Pass no EmailService; createAuth's email-aware
// callbacks throw if invoked, but introspection never reaches them.
export default createAuth(createAuthDrizzle(env).db, env)