From a6dc12d91c2c845b0a5220ca35725ed823cb575a Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Tue, 18 Nov 2025 16:14:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9(frontend)=20avoid=20unnecessary=20?= =?UTF-8?q?redirection=20while=20authenticating?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A manually constructed authentication URL didn’t match the actual endpoint address, causing the Django backend to issue a 301 redirect to the correct URL. This wasn’t a problem for regular users at first, but once a client integrating through a virtual browser came on board, it became significant. The 301 redirect was disrupting the virtual browser’s cookie/cache system, which in turn broke the authentication flow. This change aims to resolve the issue, although it’s not yet certain that it will fully address their problem. --- src/frontend/src/features/auth/utils/authUrl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/features/auth/utils/authUrl.ts b/src/frontend/src/features/auth/utils/authUrl.ts index af8a78dc..cfadd97e 100644 --- a/src/frontend/src/features/auth/utils/authUrl.ts +++ b/src/frontend/src/features/auth/utils/authUrl.ts @@ -5,6 +5,6 @@ export const authUrl = ({ returnTo = window.location.href, } = {}) => { return apiUrl( - `/authenticate?silent=${encodeURIComponent(silent)}&returnTo=${encodeURIComponent(returnTo)}` + `/authenticate/?silent=${encodeURIComponent(silent)}&returnTo=${encodeURIComponent(returnTo)}` ) }