mirror of
https://github.com/kennethnym/aris.git
synced 2026-02-03 05:31:16 +00:00
feat(backend): add BetterAuth email/password authentication
- Add PostgreSQL connection (src/db.ts) - Configure BetterAuth with email/password (src/auth/index.ts) - Add session middleware for route protection (src/auth/session-middleware.ts) - Add registerAuthHandlers for mounting auth routes (src/auth/http.ts) - Rename index.ts to server.ts - Add .env.example with required environment variables Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
10
apps/aris-backend/src/auth/index.ts
Normal file
10
apps/aris-backend/src/auth/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { betterAuth } from "better-auth"
|
||||
|
||||
import { pool } from "../db.ts"
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: pool,
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user