mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-12 15:04:53 +02:00
8 lines
280 B
TypeScript
8 lines
280 B
TypeScript
import { cookies } from "next/headers";
|
|
import lucia from "@server/auth";
|
|
|
|
export async function verifySession() {
|
|
const sessionId = cookies().get(lucia.sessionCookieName)?.value ?? null;
|
|
const session = await lucia.validateSession(sessionId || "");
|
|
return session;
|
|
}
|