Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/app/src/components/google-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Comment on lines +26 to +30
Copy link

Copilot AI Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider inlining the URL conversion if the variable is only used once (e.g., directly passing new URL(redirectTo, window.location.origin).toString() to authClient.signIn.social), or add a clarifying comment if keeping the variable improves readability.

Suggested change
const callbackURL = new URL(redirectTo, window.location.origin);
await authClient.signIn.social({
provider: "google",
callbackURL: callbackURL.toString(),
await authClient.signIn.social({
provider: "google",
callbackURL: new URL(redirectTo, window.location.origin).toString(),

Copilot uses AI. Check for mistakes.
});
};

Expand Down