auth code changes / misc
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user