From 060e8ef33987ddd5367a54a92594675c42fc19ce Mon Sep 17 00:00:00 2001 From: AshPara10 Date: Tue, 23 Dec 2025 19:34:56 +0530 Subject: [PATCH 1/2] configured linkedin social provider --- src/lib/auth.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 4c87d01..ad8e026 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -35,15 +35,11 @@ export const auth = betterAuth({ clientId: process.env.AUTH_GOOGLE_ID!, clientSecret: process.env.AUTH_GOOGLE_SECRET!, }, - // github: { - // clientId: process.env.GITHUB_CLIENT_ID!, - // clientSecret: process.env.GITHUB_CLIENT_SECRET!, - // }, - // Proper LinkedIn configuration linkedin: { clientId: process.env.LINKEDIN_CLIENT_ID!, clientSecret: process.env.LINKEDIN_CLIENT_SECRET!, }, + }, session: { expiresIn: 60 * 60 * 24 * 30, // 30 days @@ -62,15 +58,15 @@ export const auth = betterAuth({ generateId: () => crypto.randomUUID(), }, }, - // Remove hooks temporarily to fix OAuth flow - // We'll implement profile creation differently trustedOrigins: [ process.env.NEXT_PUBLIC_BASE_URL!, process.env.BASE_URL!, + "http://localhost:3000" ].filter(Boolean), secret: process.env.AUTH_SECRET!, }); + // Export the auth handlers for API routes export const authHandler = auth.handler; export const GET = authHandler; From 56f16f9dd96e438800ba01d2e14f987cf11e00cb Mon Sep 17 00:00:00 2001 From: AshPara10 Date: Tue, 23 Dec 2025 20:36:22 +0530 Subject: [PATCH 2/2] cleanu[ --- src/lib/auth.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index ad8e026..b6bc06e 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -61,7 +61,6 @@ export const auth = betterAuth({ trustedOrigins: [ process.env.NEXT_PUBLIC_BASE_URL!, process.env.BASE_URL!, - "http://localhost:3000" ].filter(Boolean), secret: process.env.AUTH_SECRET!, });