Skip to content

Commit 660f17e

Browse files
authored
Merge pull request #488 from trycompai/main
[comp] Production Deploy
2 parents 44a1615 + bd00069 commit 660f17e

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

apps/app/src/components/google-sign-in.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ export function GoogleSignIn({
1818

1919
const handleSignIn = async () => {
2020
setLoading(true);
21+
let redirectTo = "/";
2122

22-
const redirectTo = inviteCode
23-
? `/api/auth/invitation?code=${inviteCode}`
24-
: "/";
25-
26-
const callbackURL = new URL(redirectTo, window.location.origin);
23+
if (inviteCode) {
24+
redirectTo = `/api/auth/invitation?code=${inviteCode}`;
25+
}
2726

2827
await authClient.signIn.social({
2928
provider: "google",
30-
callbackURL: callbackURL.toString(),
3129
});
3230
};
3331

0 commit comments

Comments
 (0)