We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 44a1615 + bd00069 commit 660f17eCopy full SHA for 660f17e
1 file changed
apps/app/src/components/google-sign-in.tsx
@@ -18,16 +18,14 @@ export function GoogleSignIn({
18
19
const handleSignIn = async () => {
20
setLoading(true);
21
+ let redirectTo = "/";
22
- const redirectTo = inviteCode
23
- ? `/api/auth/invitation?code=${inviteCode}`
24
- : "/";
25
-
26
- const callbackURL = new URL(redirectTo, window.location.origin);
+ if (inviteCode) {
+ redirectTo = `/api/auth/invitation?code=${inviteCode}`;
+ }
27
28
await authClient.signIn.social({
29
provider: "google",
30
- callbackURL: callbackURL.toString(),
31
});
32
};
33
0 commit comments