From c7530dcbabb1d4f71ac0f8189c6a4ab86c884e8d Mon Sep 17 00:00:00 2001 From: AINDUSTRIES Date: Sat, 18 Jul 2026 00:31:47 -0400 Subject: [PATCH] Proper authentication (needs more user feedback) --- app/hooks/auth.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/hooks/auth.tsx b/app/hooks/auth.tsx index cf629c9..bd2e3e9 100644 --- a/app/hooks/auth.tsx +++ b/app/hooks/auth.tsx @@ -28,7 +28,7 @@ export function AuthProvider({children}: PropsWithChildren) { const load = async () => { if (searchParams.get("openid.ns") !== null) { - let response = await fetch("http://localhost:8080/login?" + searchParams.toString()).then(r => r.text()); + let response = await fetch("http://localhost:8080/login?" + searchParams.toString(), {credentials: "include"}).then(r => r.text()); setSeachParams({}, {replace: true}); if (response === "nok") { // TODO: signal error to user @@ -50,6 +50,7 @@ export function AuthProvider({children}: PropsWithChildren) { }; const logout = async () => { + await fetch("http://localhost:8080/logout", {credentials: "include"}) setUser(null); };