chore: init
This commit is contained in:
15
src/auth.ts
Normal file
15
src/auth.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
import { username } from "better-auth/plugins";
|
||||
import { pool } from "./db";
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: pool,
|
||||
emailAndPassword: {
|
||||
enabled: true
|
||||
},
|
||||
plugins: [
|
||||
username({
|
||||
minUsernameLength: 3
|
||||
})
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user