This commit is contained in:
eric
2026-03-12 04:27:34 -05:00
parent e7dde61e31
commit d514f8348d
3 changed files with 3 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ export default function JoinPage() {
const checkAuth = useCallback(async () => {
if (getStoredToken()) return true;
try {
const res = await fetch("/api/auth/me");
const res = await fetch("/api/auth/me", { credentials: "include" });
const data = await res.json();
return !!(data?.user && data?.token);
} catch {

View File

@@ -49,6 +49,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 */

View File

@@ -28,7 +28,7 @@ export default function Header() {
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) {