feat(dashboard): add transactions and users management pages with CRUD functionality
feat(auth): implement login page and authentication middleware feat(sidebar): create sidebar component with user info and navigation links feat(api): establish API client for interacting with backend services
This commit is contained in:
@@ -2,7 +2,7 @@ import { betterAuth } from 'better-auth'
|
||||
import { drizzleAdapter } from 'better-auth/adapters/drizzle'
|
||||
import { useDrizzle } from './db.js'
|
||||
import * as schema from '@/db/schema.ts'
|
||||
import { admin, bearer, jwt, username } from 'better-auth/plugins'
|
||||
import { admin, bearer, username } from 'better-auth/plugins'
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: drizzleAdapter(useDrizzle(), {
|
||||
@@ -11,13 +11,16 @@ export const auth = betterAuth({
|
||||
...schema,
|
||||
},
|
||||
}),
|
||||
trustedOrigins: [
|
||||
process.env.WEB_ORIGIN ?? 'http://localhost:3000',
|
||||
],
|
||||
user: {
|
||||
additionalFields: {},
|
||||
},
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
},
|
||||
plugins: [admin(), username(), bearer(), jwt()],
|
||||
plugins: [admin(), username(), bearer()],
|
||||
advanced: {
|
||||
cookiePrefix: 'helios_auth',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user