Repository Public
1import { apiSession, json } from "@/lib/auth";2import { handle } from "../_lib";34export const runtime = "nodejs";5export const dynamic = "force-dynamic";67export async function GET(req: Request) {8 return handle(async () => {9 const s = await apiSession(req);10 if (s.error) return s.error;11 const x = s.session;12 return json({ user: x.user, session: { id: x.id, createdAt: x.createdAt.toISOString(), expiresAt: x.expiresAt.toISOString(), reauthAt: x.reauthAt.toISOString(), recentAuth: x.recentAuth } });13 });14}15