mirror of
https://github.com/fosrl/pangolin.git
synced 2025-06-25 06:38:49 +02:00
10 lines
242 B
TypeScript
10 lines
242 B
TypeScript
|
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;
|
||
|
}
|