diff --git a/packages/web/src/pages/auth/login.tsx b/packages/web/src/pages/auth/login.tsx index f0d2a6d..1ff960f 100644 --- a/packages/web/src/pages/auth/login.tsx +++ b/packages/web/src/pages/auth/login.tsx @@ -11,10 +11,10 @@ const Login = () => { React.useEffect(() => { const url = new URL(window.location.href); - const callbackHost = `${url.protocol}://${url.host}`; + const callbackHost = new URL('/', url); const redirectServerID = url.searchParams.get('r'); if (!redirectServerID) { - window.location.href = `${apiUrl}/login-bounce?cbh=${callbackHost}`; + window.location.href = `${apiUrl}/login-bounce?cbh=${callbackHost.href}`; return; }