diff --git a/apps/backend/src/lib/auth.ts b/apps/backend/src/lib/auth.ts index 85a0319..3a525d5 100644 --- a/apps/backend/src/lib/auth.ts +++ b/apps/backend/src/lib/auth.ts @@ -23,7 +23,6 @@ export const auth = betterAuth({ clientSecret: process.env.GOOGLE_CLIENT_SECRET!, }, }, - trustedOrigins: [ process.env.APP_BASE_URL ?? 'http://localhost:5173', process.env.BETTER_AUTH_URL ?? 'http://localhost:3000', diff --git a/apps/frontend/src/features/login/login-page.tsx b/apps/frontend/src/features/login/login-page.tsx index 425bcb9..e487131 100644 --- a/apps/frontend/src/features/login/login-page.tsx +++ b/apps/frontend/src/features/login/login-page.tsx @@ -57,7 +57,7 @@ export function LoginPage({ redirectTo = '/' }: LoginPageProps) { provider: 'google', callbackURL: redirectTo.startsWith('http') ? redirectTo - : `http://localhost:5173${redirectTo}`, + : `${window.location.origin}${redirectTo}`, }); } catch { setSubmitError('No pudimos iniciar sesión con Google.');