Project import from github
This commit is contained in:
commit
0add58254d
179 changed files with 23756 additions and 0 deletions
18
shared/utils/auth.ts
Normal file
18
shared/utils/auth.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { betterAuth } from "better-auth";
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
import { v7 as uuidv7 } from "uuid";
|
||||
import db from "./db/index";
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: drizzleAdapter(db, {
|
||||
provider: "pg",
|
||||
}),
|
||||
advanced: {
|
||||
database: {
|
||||
generateId: () => uuidv7(),
|
||||
},
|
||||
},
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue