login page / auth flow changes

This commit is contained in:
2025-11-26 10:08:24 -05:00
parent eb38f8865f
commit 21b112f460
8 changed files with 37 additions and 11 deletions

View File

@@ -6,8 +6,6 @@ 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');
}