feat: working login and logged out
This commit is contained in:
@@ -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,
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user