From 9b906cbf145eee6112db1367f1eeb74822843c65 Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Fri, 5 Dec 2025 09:47:31 +0100 Subject: [PATCH] Fixed RedirectUrl not working --- Views/Account/Login.cshtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Views/Account/Login.cshtml b/Views/Account/Login.cshtml index 8a06626..4c7d7d1 100644 --- a/Views/Account/Login.cshtml +++ b/Views/Account/Login.cshtml @@ -55,7 +55,8 @@ document.getElementById('loginForm').addEventListener('submit', async (e) => { }); if (response.ok) { - window.location.href = '/'; + let returnUrl = new URLSearchParams(window.location.search).get('ReturnUrl'); + window.location.href = returnUrl ? returnUrl : '/'; } else { const error = await response.json(); messageDiv.innerHTML = `
${error.message}
`;