Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix: resolve merge conflict in login page, adopt main's CLI auth flow

Naiyuan Qing939415db92c1
diff --cc apps/web/app/(auth)/login/page.tsx
index 0674c037b2,abe2ac121e..215a34ae29
--- a/apps/web/app/(auth)/login/page.tsx
+++ b/apps/web/app/(auth)/login/page.tsx
@@@ -21,6 -21,28 +21,28 @@@ import
InputOTPGroup,
InputOTPSlot,
} from "@/components/ui/input-otp";
-import type { User } from "@multica/types";
++import type { User } from "@/shared/types";
+
+ function validateCliCallback(cliCallback: string): boolean {
+ try {
+ const cbUrl = new URL(cliCallback);
+ if (cbUrl.protocol !== "http:") return false;
+ if (cbUrl.hostname !== "localhost" && cbUrl.hostname !== "127.0.0.1")
+ return false;
+ return true;
+ } catch {
+ return false;
+ }
+ }
+
+ function redirectToCliCallback(
+ cliCallback: string,
+ token: string,
+ cliState: string
+ ) {
+ const separator = cliCallback.includes("?") ? "&" : "?";
+ window.location.href = `${cliCallback}${separator}token=${encodeURIComponent(token)}&state=${encodeURIComponent(cliState)}`;
+ }
function LoginPageContent() {
const router = useRouter();