feat: Add authentication, file management with Cloudinary support, and Prisma-integrated file cleanup.
This commit is contained in:
+4
-3
@@ -4,6 +4,7 @@ import { PrismaClient } from '@prisma/client';
|
||||
import { admin } from 'better-auth/plugins';
|
||||
|
||||
import { applyFileCleanup } from '../prisma/file-cleanup.helper';
|
||||
import { config } from '../shared/config/config';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
applyFileCleanup(prisma);
|
||||
@@ -27,12 +28,12 @@ export const auth = betterAuth({
|
||||
sendOnSignIn: true,
|
||||
autoSignInAfterVerification: true,
|
||||
},
|
||||
trustedOrigins: ['http://localhost:5173', 'http://localhost:5174'],
|
||||
trustedOrigins: config.trustedOrigins,
|
||||
socialProviders: {
|
||||
google: {
|
||||
prompt: 'select_account',
|
||||
clientId: process.env.GOOGLE_CLIENT_ID!,
|
||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
||||
clientId: config.googleClientId,
|
||||
clientSecret: config.googleClientSecret,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user