mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-16 19:29:26 +02:00
* fix(web): preserve CLI callback params across Google OAuth redirect When 'multica login' runs in a headless/WSL2 environment, the CLI generates a login URL with cli_callback and cli_state query parameters. These params were being lost during the Google OAuth redirect because: 1. The login page did not encode cli_callback/cli_state into the Google OAuth state parameter (only platform and nextUrl were included). 2. The callback page had no code path to redirect the JWT back to the CLI's local HTTP listener after Google OAuth completed. Fix: - Login page: encode cli_callback and cli_state into the Google OAuth state parameter alongside existing platform/nextUrl values. - Callback page: parse cli_callback/cli_state from the returned state, validate the callback URL, and redirect the JWT token to the CLI's local HTTP listener after successful Google login. Closes #3049 Co-authored-by: multica-agent <github@multica.ai> * refactor(auth): reuse redirectToCliCallback helper in OAuth callback Export the existing redirectToCliCallback helper from @multica/views/auth and reuse it in the Google OAuth callback page instead of duplicating the token+state redirect string inline, so the CLI callback URL contract lives in one place. Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: multica-agent <github@multica.ai> Co-authored-by: J <j@multica.ai>