diff --git a/ui/app/api/auth/callback/github/route.ts b/ui/app/api/auth/callback/github/route.ts index 2c70a8cd88..d913844644 100644 --- a/ui/app/api/auth/callback/github/route.ts +++ b/ui/app/api/auth/callback/github/route.ts @@ -53,7 +53,7 @@ export async function GET(req: Request) { // eslint-disable-next-line no-console console.error("SignIn error:", error); return NextResponse.redirect( - new URL("/sign-in?error=AuthenticationFailed", req.url), + new URL("/sign-in?error=AuthenticationFailed", baseUrl), ); } } catch (error) { diff --git a/ui/app/api/auth/callback/google/route.ts b/ui/app/api/auth/callback/google/route.ts index 0f92d8ef46..37fea85f00 100644 --- a/ui/app/api/auth/callback/google/route.ts +++ b/ui/app/api/auth/callback/google/route.ts @@ -53,7 +53,7 @@ export async function GET(req: Request) { // eslint-disable-next-line no-console console.error("SignIn error:", error); return NextResponse.redirect( - new URL("/sign-in?error=AuthenticationFailed", req.url), + new URL("/sign-in?error=AuthenticationFailed", baseUrl), ); } } catch (error) {