forked from cartsnitch/cartsnitch
a35c264823
Replace React Router navigate() with window.location.href = '/' after successful sign-in. Better-Auth's useSession() hasn't updated its internal cache when navigate() fires, causing ProtectedRoute to see a null session and redirect back to /login. A full page reload reinitializes useSession() with fresh cookie-backed session state. Also remove the VITE_MOCK_AUTH fallback block that used setAuthenticated() since the mock auth flow now goes through the same window.location.href path. Co-Authored-By: Paperclip <noreply@paperclip.ing>