From e194f61c2fc0dc596add0e4a563f39b240b332e8 Mon Sep 17 00:00:00 2001 From: Mariano Fuentes Date: Tue, 29 Apr 2025 15:58:13 -0400 Subject: [PATCH] Add support for dynamic callback URL in Google sign-in flow --- apps/app/src/components/google-sign-in.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/app/src/components/google-sign-in.tsx b/apps/app/src/components/google-sign-in.tsx index 47e7837e2e..be899eb860 100644 --- a/apps/app/src/components/google-sign-in.tsx +++ b/apps/app/src/components/google-sign-in.tsx @@ -23,8 +23,11 @@ export function GoogleSignIn({ ? `/api/auth/invitation?code=${inviteCode}` : "/"; + const callbackURL = new URL(redirectTo, window.location.origin); + await authClient.signIn.social({ provider: "google", + callbackURL: callbackURL.toString(), }); };