import{formatSession as e}from"../utils/auth/getAuth.mjs";import{fromNodeHeaders as t}from"better-auth/node";const n=n=>async(r,i)=>{if(r.locals||={},r.locals.authType!==void 0)return;let a=await n.api.getSession({headers:t(r.headers)});if(a){let t=e(a);r.locals.authType=`session`,Object.entries(t).forEach(([e,t])=>{r.locals[e]=t})}};export{n as authMiddleware};
//# sourceMappingURL=sessionAuth.middleware.mjs.map