diff --git a/apps/web/src/app/(auth)/login/page.tsx b/apps/web/src/app/(auth)/login/page.tsx index 73c34e1..755784f 100644 --- a/apps/web/src/app/(auth)/login/page.tsx +++ b/apps/web/src/app/(auth)/login/page.tsx @@ -52,8 +52,8 @@ function LoginForm() { try { await signIn.social({ provider: "google", + callbackURL: "/editor", }); - router.push("/editor"); } catch (error) { setError("Failed to sign in with Google. Please try again."); setIsGoogleLoading(false); diff --git a/packages/auth/src/server.ts b/packages/auth/src/server.ts index f6c68dc..6590c0a 100644 --- a/packages/auth/src/server.ts +++ b/packages/auth/src/server.ts @@ -16,7 +16,7 @@ export const auth = betterAuth({ emailAndPassword: { enabled: true, }, - socialProviders: { + socialProviders: { google: { clientId: process.env.GOOGLE_CLIENT_ID as string, clientSecret: process.env.GOOGLE_CLIENT_SECRET as string, @@ -26,4 +26,4 @@ export const auth = betterAuth({ trustedOrigins: ["http://localhost:3000"], }); -export type Auth = typeof auth; \ No newline at end of file +export type Auth = typeof auth;