From 1095bcbe9d9c956b26527d2a4e5de4da6f7ae253 Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Mon, 3 Jun 2024 12:03:37 +0200 Subject: [PATCH] fix: send pathname instead of full url as redirectTo query param --- lib/trpc/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/trpc/server.ts b/lib/trpc/server.ts index a6467fb91..d824755b4 100644 --- a/lib/trpc/server.ts +++ b/lib/trpc/server.ts @@ -35,7 +35,7 @@ export function serverClient() { const fullPathname = new URL(fullUrl).pathname if (webviews.includes(fullPathname)) { - const redirectUrl = `/${lang}/webview/refresh?returnurl=${encodeURIComponent(fullUrl)}` + const redirectUrl = `/${lang}/webview/refresh?returnurl=${encodeURIComponent(fullPathname)}` console.error( "Unautorized in webview, redirecting to: ", redirectUrl