feat: auto-trigger clone after login redirect

This commit is contained in:
CREDO23 2026-01-27 09:38:52 +02:00
parent 1c98ba989d
commit 0ad59edda0
2 changed files with 37 additions and 11 deletions

View file

@ -27,6 +27,13 @@ function LoginContent() {
const error = searchParams.get("error");
const message = searchParams.get("message");
const logout = searchParams.get("logout");
const returnUrl = searchParams.get("returnUrl");
// Save returnUrl to localStorage so it persists through OAuth flows (e.g., Google)
// This is read by TokenHandler after successful authentication
if (returnUrl) {
localStorage.setItem("surfsense_redirect_path", decodeURIComponent(returnUrl));
}
// Show registration success message
if (registered === "true") {