From f1f93ddb1ec4faceea895dd3226990541259ec9b Mon Sep 17 00:00:00 2001 From: Netanel Gilad Date: Sun, 5 Oct 2025 17:53:35 +0300 Subject: [PATCH] always redirect to full url after login --- src/modules/auth.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/auth.ts b/src/modules/auth.ts index af6416f..519ca62 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -51,7 +51,9 @@ export function createAuthModule( return; } // If nextUrl is not provided, use the current URL - const redirectUrl = nextUrl || window.location.href; + const redirectUrl = nextUrl + ? new URL(nextUrl, window.location.origin).toString() + : window.location.href; // Build the login URL const loginUrl = `${