diff --git a/app/components/AuthModal.tsx b/app/components/AuthModal.tsx index 6bfa1fc..225b616 100644 --- a/app/components/AuthModal.tsx +++ b/app/components/AuthModal.tsx @@ -52,6 +52,7 @@ export default function AuthModal({ isOpen, onClose, onSuccess }: AuthModalProps method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ token: result.token, record: result.record }), + credentials: "include", }); } catch { /* ignore */ diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index d64975e..042a125 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -25,7 +25,7 @@ export default function NavbarComponent() { let mounted = true; (async () => { try { - const res = await fetch("/api/auth/me"); + const res = await fetch("/api/auth/me", { credentials: "include" }); const data = await res.json(); if (!mounted) return; if (data?.user && data?.token) {