auth code changes / misc

This commit is contained in:
2025-11-25 05:56:46 -05:00
parent fb64a0f99a
commit 05aa48af14
7 changed files with 65 additions and 57 deletions

View File

@@ -6,6 +6,8 @@ import { requireAuthHook } from "@/hooks/requireAuthHook";
const user = await requireAuthHook(Astro);
if (!user) {
const decodedUrl = decodeURIComponent(Astro.url.pathname + Astro.url.search);
Astro.cookies.set('returnTo', decodedUrl, { path: '/' });
return Astro.redirect('/login');
}