feat: working login and logged out

This commit is contained in:
2026-09-10 23:40:08 +02:00
parent 300b1ce774
commit ac56bf4894
7 changed files with 97 additions and 24 deletions
+16
View File
@@ -0,0 +1,16 @@
import { define, unsetAuthCookie } from "../utils.ts";
export const handler = define.handlers({
GET(ctx) {
const headers = new Headers();
unsetAuthCookie(headers);
const url = new URL(ctx.req.url);
url.pathname = "/";
headers.set("location", url.toString());
return new Response(null, {
status: 303,
headers,
});
},
});