mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-13 17:52:38 +02:00
fix(auth): centralize redirect path storage
This commit is contained in:
parent
c8374e6c5b
commit
fb0c13911d
3 changed files with 14 additions and 5 deletions
|
|
@ -8,6 +8,7 @@ import { toast } from "sonner";
|
|||
import { Logo } from "@/components/Logo";
|
||||
import { useGlobalLoadingEffect } from "@/hooks/use-global-loading";
|
||||
import { getAuthErrorDetails, shouldRetry } from "@/lib/auth-errors";
|
||||
import { setRedirectPath } from "@/lib/auth-utils";
|
||||
import { AUTH_TYPE } from "@/lib/env-config";
|
||||
import { AmbientBackground } from "./AmbientBackground";
|
||||
import { GoogleLoginButton } from "./GoogleLoginButton";
|
||||
|
|
@ -33,7 +34,7 @@ function LoginContent() {
|
|||
// 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));
|
||||
setRedirectPath(decodeURIComponent(returnUrl));
|
||||
}
|
||||
|
||||
// Show registration success message
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue