feat: bearer auth, auto-sync events, test seed
- Add bearer plugin to BetterAuth for mobile auth - Auto-sync birthday/anniversary events on client create/update - Add /api/events/sync-all endpoint for bulk sync - Add test user seed (test@test.com / test) - Expose set-auth-token header in CORS
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { betterAuth } from 'better-auth';
|
||||
import { bearer } from 'better-auth/plugins';
|
||||
import { drizzleAdapter } from 'better-auth/adapters/drizzle';
|
||||
import { db } from '../db';
|
||||
import * as schema from '../db/schema';
|
||||
@@ -13,6 +14,9 @@ export const auth = betterAuth({
|
||||
verification: schema.verifications,
|
||||
},
|
||||
}),
|
||||
plugins: [
|
||||
bearer(), // Enable bearer token auth for mobile apps
|
||||
],
|
||||
emailAndPassword: {
|
||||
enabled: true,
|
||||
requireEmailVerification: false, // Enable later for production
|
||||
|
||||
Reference in New Issue
Block a user