mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 22:49:27 +02:00
added utils for unauth, verify, and response
This commit is contained in:
parent
d1e198fe55
commit
44e020784b
11 changed files with 125 additions and 69 deletions
9
server/auth/verifySession.ts
Normal file
9
server/auth/verifySession.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { Request } from "express";
|
||||
import { lucia } from "@server/auth";
|
||||
|
||||
export async function verifySession(req: Request) {
|
||||
const res = await lucia.validateSession(
|
||||
req.cookies[lucia.sessionCookieName],
|
||||
);
|
||||
return res;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue