forked from cartsnitch/cartsnitch
fix/car-741-login-redirect-race-clean
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>
cartsnitch
@ a53daddb9a
CartSnitch
Description
Consumer savings platform with grocery coupon tracking, deal alerts, and price comparison
Languages
Python
85.2%
TypeScript
13.5%
Shell
0.5%
Dockerfile
0.5%
Mako
0.1%