feat: add basic webui
This commit is contained in:
18
packages/auth/better-auth.config.ts
Normal file
18
packages/auth/better-auth.config.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { PostgresPool } from '@konobangu/database/builder';
|
||||
import { betterAuth } from 'better-auth';
|
||||
import { nextCookies } from 'better-auth/next-js';
|
||||
import { organization } from 'better-auth/plugins';
|
||||
|
||||
export interface BuildAuthProps {
|
||||
pool: PostgresPool;
|
||||
baseURL: string;
|
||||
}
|
||||
|
||||
export const buildAuth = ({ pool, baseURL }: BuildAuthProps) =>
|
||||
betterAuth({
|
||||
database: pool,
|
||||
plugins: [nextCookies(), organization()],
|
||||
baseURL,
|
||||
});
|
||||
|
||||
export { getMigrations as getAuthMigrations } from 'better-auth/db';
|
||||
Reference in New Issue
Block a user